carlover Posted December 25, 2008 Report Share Posted December 25, 2008 Hi, I am trying to get an image from web page into IMAQ vision for processing - this is my ultimate goal. Basically image resides on webserver as (for example) http://example.com/myImage.jpg Image will be changing and I would like to read it at least 3-5 times a second. This is what I have so far, but perhaps there is better way: I can get the image using Datasocket method (see crelf's post). Instead of picture display I load it into IMAQ image (basically temp file that is saved is opened by IMAQ instead of Read JPEG). Speed is of the essence and I am wondering if there is a faster way then saving file to disk and then loading and opening the image? What I mean is: when data string is read from Datasocket, is there a way to convert it to a data type read by IMAQ vision without save/read method from above. I did a lot of searching, and tried few things myself but am coming up short Thanks Quote Link to comment
Rolf Kalbermatter Posted December 28, 2008 Report Share Posted December 28, 2008 QUOTE (carlover @ Dec 24 2008, 06:18 PM) Hi,I am trying to get an image from web page into IMAQ vision for processing - this is my ultimate goal. Basically image resides on webserver as (for example) http://example.com/myImage.jpg Image will be changing and I would like to read it at least 3-5 times a second. This is what I have so far, but perhaps there is better way: I can get the image using Datasocket method (see crelf's post). Instead of picture display I load it into IMAQ image (basically temp file that is saved is opened by IMAQ instead of Read JPEG). Speed is of the essence and I am wondering if there is a faster way then saving file to disk and then loading and opening the image? What I mean is: when data string is read from Datasocket, is there a way to convert it to a data type read by IMAQ vision without save/read method from above. I did a lot of searching, and tried few things myself but am coming up short Thanks Well there always is but I doubt you want to go to that length. It would probabply mean to call the JPEG (or whatever format you have) DLL directly with two memory buffers to decompress from and into and then using the IMAQ GetImagePixelPtr function to directly copy the entire decompressed buffer properly into the IMAQ image. All this would be best done in an external code function written in C. You can of course also use the IMAQ ArrayToImage function instead so you have not to worry about getting the correct memory offsets into the pointer but that function is considerably slower. Rolf Kalbermatter 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.