Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Is it possible to pick up random points in the specific region of the image?

Solved!
Go to solution

Hi,

I am doing the image analysis. I came across one problem. I want to pick up one random point from the 8-bit image I am processing. But I have one more constraint: the point should be within one particular region in the image. Is there any diagram can be used?

Any advice is welcomed. Thanks heaps.

(e.g. in the image attached, is it possible to select the random points in the black region? Because, finally, I want to pick up more 1000 random points in the image, I need all of them are in black regions.)

Jian

0 Kudos
Message 1 of 4
(3,344 Views)
Solution
Accepted by topic author lenienter

One easy way is just to generate random points and check whether they lie within your particular region.  Something like this:

 

RandomPoint.png

 

Message 2 of 4
(3,337 Views)

Thank you very much. I cannot check your method immediately, because my Labview broke down yesterday. I tried to re-install the Labview 2009, but I came across Runtime error and I could not proceed. I don't know the reason why.

BTW, is it possible to combine all these icons into one icon?

Anyway, Thank you again for your help.

0 Kudos
Message 3 of 4
(3,330 Views)

Hi Jian,

 

I think you have a very good solution at hand here. I think by asking how to "combine all these icons," you are asking about a SubVI.  Take a look at this Introduction to LabVIEW help resource.  Under LabVIEW Environment Basics you will find information on how to create a subVI.

Wes Pierce
Principal Engineer
Pierce Controls
0 Kudos
Message 4 of 4
(3,305 Views)