Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Image Compression

hi,

i want to compress an image on the compact vision (captured with a firewire cam) and send it (via UDP) to a c++ program on another pc!

could i use the IMAQ Remote Compression in my case?

Firewire Came -> Compact Vision -> Make Picture -> IMAQ Remote Compression -> Flatten to String -> Send via UDP to the C++ prog on the other PC
-> Receive UDP String -> uncompress (maybe) -> display it with QT, mfc or winapi....

bye
0 Kudos
Message 1 of 7
(4,764 Views)
Hi Gery :-),

open NI Example Finder, in Search Tab type "UDP". You will find an example for a UDP sender/receiver.
To transmit a file via UDP or TCP have a look on the attached example (programmend in LV 8).
The example has a simple logic included and works with TCP functions, but it is possible to use UDP functions instead.

Regards,
Tom

Message Edited by ThSa on 05-24-2006 05:25 PM

0 Kudos
Message 2 of 7
(4,730 Views)
hi,
i already solved that problem...
i cut the first 131 bytes of the compressed binary image string....and sent it to the c++ prog....it works fine now!!
thx..bye
i will post the result later...
0 Kudos
Message 3 of 7
(4,725 Views)
later i will try the Download - Transfer_JPEG_Compressed_Images_LV61.zip on the page:
http://sine.ni.com/apps/utf8/niepd_web_display.display_epd4?p_guid=B45EACE3E88D56A4E034080020E74861
maybe i can increase the compression speed....but i think the major time takes the grabbing of the picture....
Message 4 of 7
(4,723 Views)
hi,

how can i fix this probl.?
The IMAQ JPEG Encode needs an datatype IMAGE but the output of the IMAQ1394 Grab Acquire is an IMAQ Image....so i get this error:

These cannot be wired together because their data types (numeric, string, array, cluster, etc.) do not match. Show the Context Help window to see what data type is required.
The type of the source is IMAQImage.
The type of the sink is cluster of 2 elements.

This type mismatch may be caused by an older instance of the Image data type.  To fix it, simply replace the instance with the IMAQ Image.ctl type definition in the Image Controls menu palette.

cu
0 Kudos
Message 5 of 7
(4,650 Views)
Data types for the image functions in IMAQ Vision and NI-IMAQ have changed with newer versions of the software. Therefore using an older version of IMAQ Vision with a newer version of NI-IMAQ would result in an error, similar to the "Invalid Image Type" error above.

In you case it is necessary to open the IMAQ JPEG Encode.vi and to replace the image cluster control with an imaq image control

Below I have attached one example.

regards,
ThSa


Message Edited by ThSa on 06-12-2006 01:10 PM

0 Kudos
Message 6 of 7
(4,644 Views)
hi,
could u disable the SubSampling 4:1:1 or 4:2:2 ?
the problem is a red is received as blue...

cu
0 Kudos
Message 7 of 7
(4,602 Views)