Equivlant to Matlab Sum Segmentation

asked 2015-07-08 09:09:50 -0600

DDS_Mytheral gravatar image

Using Sum Segmentation in Matlab you can turn this:

image description

Into this:

image description

Which is my first step in creating a best fit grid for the dot array. Normally I'd just impose a grid over the dots but the dots positions are somewhat random as they are placed by hand. The fact they are placed by hand means I need to create a "Best Fit Grid" to properly segment the image.

So does OpenCV have a "Sum Segmentation" fuction or if not is there another way I can go about this?

edit retag flag offensive close merge delete

Comments

Can you explain a bit the Sum Segmentation from Matlab? What does it do?

thdrksdfthmn gravatar imagethdrksdfthmn ( 2015-07-08 10:47:32 -0600 )edit

Basically it just adds up the number of pixels in each row and column. Generally you run a blackhat filter on the image then use sum segmentation mask to add up each non-transparent pixel. From that you can use those sums to form a grid.

DDS_Mytheral gravatar imageDDS_Mytheral ( 2015-07-08 13:02:45 -0600 )edit

ok, the idea is clicking on the spots?

thdrksdfthmn gravatar imagethdrksdfthmn ( 2015-07-09 02:20:12 -0600 )edit