golzio Posted September 6, 2008 Report Share Posted September 6, 2008 I have frames coming from a DVR lan from digimaster. If I get the frame in tha raw format I'm able to display the image coming from the camera attacched to the DVR. If I change the frame format to JPEG I'm already able to receive the frame but I'm not able to decode the JPEG. I'm not using the Vision module for labview because It is not necessary for my work (I need only to decode a Jpeg frame that is an array of U8 at this moment). I also tried to use a function contained in a JPEG.dll that is called DecompressJPEG2Raw but, even in my opinion all the paramenter are passed correctly, It doesn't work. If someone have some tip or experience I can attached or describe better my code. thank you Golzio Quote Link to comment
bmoyer Posted September 6, 2008 Report Share Posted September 6, 2008 Is this a true JPG file that can be loaded in a standard viewer program? If so the Read JPEG File.vi is the place to start (in the Programming...Graphics & Sound...Graphics Formats palette). Could you describe your application in a bit more detail? Quote Link to comment
golzio Posted September 6, 2008 Author Report Share Posted September 6, 2008 I don't have to read a file but a stream of byte coming from a digital recording device through ethernet. I'm already able to read the frame if I ask the device to send the frame in a non compressed format and I used "Draw Flattened Pixmap.vi". In this case each frame is about 300k instead if I ask to the device to send the frame in Jpeg format the size is about 12k for a size fo 352x288. It's clear for me that's this is the best way but at the moment I'm not able to decode the jpeg frame coming from DVR Digimaster. I also try to use a function contained in the jpeg.dll but Labview hang even if I suppose to call it in the right way. Attached you can find my trial using jpeg.dll. Quote Link to comment
bmoyer Posted September 9, 2008 Report Share Posted September 9, 2008 Take a look at the NI Forum: http://forums.ni.com/ni/board/message?boar...ssage.id=335445 It seems to be doing exactly what you are doing. It encodes and decodes a JPG serial string. Bruce Quote Link to comment
Neville D Posted September 9, 2008 Report Share Posted September 9, 2008 QUOTE (bmoyer @ Sep 8 2008, 05:20 AM) Take a look at the NI Forum: http://forums.ni.com/ni/board/message?boar...ssage.id=335445It seems to be doing exactly what you are doing. It encodes and decodes a JPG serial string. Bruce Beware, the IMAQ JPEG Encode and Decode VI's downloadable from NI's website have a memory leak that will crash the application if run over a period of time. I don't remember specifically if its the Encode or the Decode, but I would use either of those with great care. Also, the Encode VI swaps the Red and Blue Color Planes so that the image if decoded by any other application (other than the supplied Decode) will cause the image to appear blue-ish. There is an available alternative VI if you have Vision called IMAQ Write String.vi which is equivalent to the Encode (and will allow you to convert any type of image to string), but I don't know of an alternative to the Decode VI. Neville. Quote Link to comment
bmoyer Posted September 9, 2008 Report Share Posted September 9, 2008 QUOTE (Neville D @ Sep 8 2008, 02:10 PM) Beware, the IMAQ JPEG Encode and Decode VI's downloadable from NI's website have a memory leak that will crash the application if run over a period of time. I don't remember specifically if its the Encode or the Decode, but I would use either of those with great care. Also, the Encode VI swaps the Red and Blue Color Planes so that the image if decoded by any other application (other than the supplied Decode) will cause the image to appear blue-ish.There is an available alternative VI if you have Vision called IMAQ Write String.vi which is equivalent to the Encode (and will allow you to convert any type of image to string), but I don't know of an alternative to the Decode VI. Neville. Why wouldn't this info have been posted on the NI forum? I guess what you're saying can be "boiled down" to "use at your own risk". Someone should accurately describe any known issues so that people are properly warned before wasting their time implementing/debugging this if there is in fact a problem. Bruce Quote Link to comment
Neville D Posted September 10, 2008 Report Share Posted September 10, 2008 QUOTE (bmoyer @ Sep 8 2008, 12:24 PM) Why wouldn't this info have been posted on the NI forum? Well, some of it is. If you look through your own link, someone does mention that the R-B planes issue can be fixed by swapping them. And since no source code has been posted for the dll's you can't fix the issue yourself either. QUOTE (bmoyer @ Sep 8 2008, 12:24 PM) Someone should accurately describe any known issues so that people are properly warned before wasting their time implementing/debugging this if there is in fact a problem. Bruce Well, I just described it for you; and if you troll through LAVA, you will find links that show the problem as well N. Quote Link to comment
golzio Posted September 12, 2008 Author Report Share Posted September 12, 2008 Hi guys, sorry for not replying during this day but I was very busy. I follow your advice and I was able to try the "IMAQ JPEG Decode.vi". It wasn't a good solution for me because I don't want (and I don't need) to use IMAQ Vision. For this reason I tried to fix my call library function to call the function "DecompressJPEG2Raw" contained in the Jpeg.dll attached here. I was able to fix it and for this reason I attached here my VI and and dll that I used. I also attached the jepg.h for someone that is interested to look at the prototype of the function contained in the Jpeg.dll Quote Link to comment
golzio Posted October 8, 2008 Author Report Share Posted October 8, 2008 Any feedback from guys that download the zip file?? Bye Golzio Quote Link to comment
nicoz Posted February 29, 2012 Report Share Posted February 29, 2012 hello golzio, could you send me the jpg.dll file? nico.zurmuehlen@cae-online.de thanks a lot Quote Link to comment
golzio Posted March 28, 2012 Author Report Share Posted March 28, 2012 I wasn't able to upload file and for this reason I send the file by email to nico Golzio Quote Link to comment
Shaun Hayward Posted April 10, 2012 Report Share Posted April 10, 2012 If you're on Windows, you might be able to wrap some of the .net System.Drawing.Bitmap class. Being a .net object, it has full support for network streams and actually can handle a whole range of image formats. The main downside to the .net approach is that some of the processing elements can take longer than pure LV variants (mostly due to crossing the LabVIEW / .NET boundary). In particular, if you go this approach, don't be tempted to use nested for loops and GetPixel() - that can take a ridiculous amount of time! Quote Link to comment
todd Posted August 21, 2013 Report Share Posted August 21, 2013 Every post you make has a link to yiigo.com. You must really like their code! Even if you haven't checked the cost and licensing conditions. I don't see any mention of cost other than requesting a quote. Quote Link to comment
Rolf Kalbermatter Posted August 21, 2013 Report Share Posted August 21, 2013 Every post you make has a link to yiigo.com. You must really like their code! Even if you haven't checked the cost and licensing conditions.I don't see any mention of cost other than requesting a quote. He just made a post replying to another post of one of his "buddies" asking if they have a trial version. Cute! Maybe Michael needs to add a specific check and reject any post with a link to yiiglo.com, rasteredge.com, and businessrefinery.com. Also interesting to know is that the "Company" link on the side arronlee likes to promote so much does not work at all. Always nice to do (online) business with a company that could literally sit in cloud 7 as soon as you are not happy about something. Quote Link to comment
Yair Posted August 21, 2013 Report Share Posted August 21, 2013 Yeah, there are a bunch of these users in the past few months both here and in the NI forums (although NI has deleted all of them the last time I looked. The LAVA mods haven't, from what I can see). As far as I'm concerned, this is pure spam. These people seem to be pretending to be regular users and pointing to different sites which are probably all owned by the same company (although a whois search doesn't seem to yield any actual results). The one I liked the most was when one of those users started a new thread just so that one of the other users can reply to it. Quote Link to comment
Phillip Brooks Posted August 21, 2013 Report Share Posted August 21, 2013 Lots of astroturfing going on. The .net barcode thread had a new comment this morning by a one hit wonder named "cindy313" linking to a different site with an overpriced library. Sigh... Quote Link to comment
todd Posted August 21, 2013 Report Share Posted August 21, 2013 At least there was a price! (One of the sites didn't even list a price. Always look on the bright side...) Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.