Filter for covariance

asked 2016-05-23 09:59:03 -0600

willoughby gravatar image

Ok, so this may seem a little odd but bear with me.

I have an image, and I have a line (point slope form). What I need is a way to find the covariance above the line and the covariance below the line.

I have brute forced this by copying all of the pixels above/below the line into a new cv::Mat one by one (while keeping track of count and sum color as I do this), and then calculating the convariance manually.

While I am geting the results that I want this is incrediblly slow. Ideally I want to add GPU acceleration however because cv::GpuMat doesn't have direct access I cant exclude the unwanted pixels from either the count or the sum color.

I believe the key is to use some kind of filter however that concept is completly foreign and I am having trouble understanding what I need to do using the documentation.

Could someone please help me bring these cookies to a lower shelf.

Thanks

L.

edit retag flag offensive close merge delete

Comments

Can you give an example image?

kbarni gravatar imagekbarni ( 2016-05-23 10:41:25 -0600 )edit
willoughby gravatar imagewilloughby ( 2016-05-24 09:09:23 -0600 )edit