Jump to content

Image from webpage to IMAQ vision


Recommended Posts

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

Link to comment

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

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.