Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Find Xmin,Max and Ymin,max ( Please Help!)

Your algorithm was just too complicated.  I couldn't figure out what you were trying to do.

 

I tried out your image in Vision Assistant.  I used auto-threshold with clustering, then I used Basic Morphology to do a 5x5 open, which eliminated all the small spots.  After that, Particle Analysis very quickly gave me the bounding rectangle of each particle.  Threshold took 4 ms, Open took 7 ms, and Particle Analysis took 4 ms.  You can't get much faster.

 

Bruce

Bruce Ammons
Ammons Engineering
0 Kudos
Message 11 of 17
(1,396 Views)
I am trying to find all the white cell which is within the withe cloud ( solar modules). Particle analysis gives 9 particle but after that I need to assign the co-ordinate system like where is my Xmin, Xmax and Ymin, Ymax are and then calculate all the area covered by the solar cell. On top of this, it should be autonomous, like solar image work with the algorithm.

I tried the same way you mentioned. When you take the constant out from pixel measuring output, particle analysis gives the 9 particle found result which is actually the quantity of the cells, solar module has. If you take the real world measurement output, it takes ages. You can be right but I program does not work.

As regards, to my algorithm, I am trying to find the pixel and then find the neighbouring pixel by searching its up, down right and left position. It is working but I do not why, it's not going to its reverse position.

Hopefully I cleared all the questions, you asked. If you can upload the code, you made so that I can look at and see the amendments which you brought into the actual code, this can be more easier for me to understand and will be thankful of you.
Many thanks
Laser
0 Kudos
Message 12 of 17
(1,391 Views)

Hello Bruce, 

 

any help on this algorithm. 

 

Lazer

0 Kudos
Message 13 of 17
(1,381 Views)

I haven't written any code.  I only used Vision Assistant briefly.  I don't really want to rewrite your code for you.  I see no reason to write a long, complicated algorithm when Particle Analysis does it much faster.

 

I would suggest doing everything in pixel coordinates, then convert them to real world when you are done.  As long as your real world coordinates are parallel to the pixel coordinates, you will get the same results.  If your real world coordinates are rotated, perhaps you should rotate the image to match, then use pixel coordinates.

 

Bruce

Bruce Ammons
Ammons Engineering
0 Kudos
Message 14 of 17
(1,380 Views)

Hello Bruce, 

 

You said in one of your reply " The bounding boxes can be combined into a single box by using the max of the maxes and the min of the mins." and I am trying to do it but could not find a way. Can you tell, how can I do this please?

 

Many Thanks,

Lazer

0 Kudos
Message 15 of 17
(1,353 Views)

Use a for loop to autoindex through the results.  For each value (top, left, bottom, right) output the value on the right of the loop and use autoindexing to get arrays.  Use array min/max to get min of top array (new top), min of left array (new left), max of bottom array (new bottom), and max of right array (new right).  Put them together to get your bounding box.

 

Bruce

Bruce Ammons
Ammons Engineering
0 Kudos
Message 16 of 17
(1,346 Views)

Hello Bruce, 

 

Thanks for advice. Can you look at my code, am I on the right track. 

 

Many Thanks 

Lazer

0 Kudos
Message 17 of 17
(1,342 Views)