Pixel grid binning - find max point in bin

asked 2014-06-05 05:21:21 -0600

Hello, I have hunted all over for this, and before I go off and code soemthing that may already exist, I thought I would ask here first.

I am trying to do some pixel binning in real world coordinates (a disparity map converted using reprojectto3d) by attempting to find the average Y value between two values (X and Z) to find the average and max height in that bin. I've coded something up by hand, but its hard coded and not very easy to change the bin sizes.

TL:DR. I'm wondering if opencv has this functionality build in somewhere that will give me a matrix back of the max and / or the average Y values, effectively reducing the pixel count in the image.

Thanks for your time!

edit retag flag offensive close merge delete

Comments

Haris gravatar imageHaris ( 2014-06-05 05:51:11 -0600 )edit
1

Hmm, I think a histogram might be more suitable, counting all the Y values in the 'bin' and then averaging all the values in the bin after that. Unless I've misunderstood the histogram function?

Dezweb52 gravatar imageDezweb52 ( 2014-06-05 08:11:31 -0600 )edit

:).................

Haris gravatar imageHaris ( 2014-06-05 08:56:08 -0600 )edit