Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

GigE Vision Multithreading Problem

Hi Eric,

thank you for taking a look at my code.

The reason I went with producer/consumer because it was proven that it is faster using my webcam.

But I will recode it again and see if I can do what you suggested.

 

Best regards,
Krispiekream
0 Kudos
Message 11 of 45
(2,088 Views)

The program you attached seemed to run correctly on my computer.  However, the images were all the 640 x 480 size.  I do agree with you that the larger image size may be affecting your application. 

Regards,

Mike S
NI AE
Hi Mike,
How do I change the video or image size? I can't seems to make it work with other video mode.
I have a similar problem with my webcam before, but I installed its driver and that fixed the problem. Do I need to do that with this camera?
Prosilica GE1910C.
I can't seems to find the drivers for it nor support from Prosilicia.
Thanks

Best regards,
Krispiekream
0 Kudos
Message 12 of 45
(2,074 Views)

Ok.

I think I have recoded my program and dropped the producer/consumer and this seems to make it worse.

 

Can you show me with a diagram on how to change my producer/consumer architecture to have two queues of images?

 

Best regards,
Krispiekream
0 Kudos
Message 13 of 45
(2,054 Views)

Krispiekream-

It appears you don’t have any pipelining occurring in your code.  I believe Eric was suggesting using shift registers to maintain only one image in memory and do your processing on that while acquiring in parallel.  

Eric-

Can you speak more to this?  

Regards,

Mike S
NI AE
0 Kudos
Message 14 of 45
(2,030 Views)

Okay,

Here is my acquired image. (I print the reference image and then use the GigE camera to view it.)

 

18533i5F9155D4C04FF6FF

 

 

Here is what my reference image look like..

 

18535iD38267FF2766ACA8

 

 

untitled.JPG

 

 

I thought about doing that to make the image smaller but then this doesnt work on Vision Asssistant.

I will attach the script file for Vision assistant.

i need to draw cross hair between the 4 corners as the object is rotated clockwise or counterclock wise.

i can make it work, except i cant make it work in real time.

it is very slow to process the image.

 

 

Best regards,
Krispiekream
0 Kudos
Message 15 of 45
(2,027 Views)

I would probably search for something smaller like the T, then connect the dots to get the crosshair.  That will be much faster than trying to match the entire pattern.

 

Second option would be to search for two opposing T symbols as a strip.

 

The circles do not make good targets since they are thin lines.  The T is a great target - solid with high contrast.

 

Bruce

Bruce Ammons
Ammons Engineering
0 Kudos
Message 16 of 45
(2,018 Views)

i am having trouble using the reference picture with the acquired picture. can someone help me.

must i use my acquire picture and try to create the reference picture from that?

or can i use the reference picture, then acquire images and match with that.

 

Best regards,
Krispiekream
0 Kudos
Message 17 of 45
(1,988 Views)

i was able to do this.

18687i73C4C5F78904A7E4

 

my reference image is  this

 

18691i0632FB8D410D0F8D

 

i couldnt use this image.

 

18695iF1EB3CB983B4228B

 

 

The image wont detect when i am using the image above.

 

Best regards,
Krispiekream
0 Kudos
Message 18 of 45
(1,986 Views)

Normally it works better to create your template from an actual image.  It can be difficult to create a simulated image that matches the real image well enough to work.

 

I would consider masking the circle portion of the template so that only the T symbols are used for the match.  That might improve things a little bit.

 

What kind of processing rates do you get for this?  How many frames per second can you process?

 

Like I said earlier, it may be even faster to just search for a single T symbol and connect the centers.

 

Bruce

Bruce Ammons
Ammons Engineering
0 Kudos
Message 19 of 45
(1,974 Views)

I actually tried the single T symbol and i got the same results.

I am thinkig that maybe Labview searches for all 4 Ts and matches the one that fit the closest to the 1 T.

I will try removing the 3 Ts and left only 1 T left and see if this will work.

I'll keep you guys updated.

 

Best regards,
Krispiekream
0 Kudos
Message 20 of 45
(1,967 Views)