How to do blob (or feature) detection on a sphere?

I’m working on a Light Estimation algorithm. My program results in coefficients for spherical harmonics, which can be used to approximate the environmental light from all directions.

With this estimation I want to estimate the main light, it’s direction and color. Since I have already implemented a renderer, which can get me fast renderings of my results, I thought I could use a simple blob detector and use the keypoint properties (center point, size, etc.) to calculate my needed values. However there are some issues…

Renderings

For example, if I use a spherical rendering (top image):

The backside of the sphere is rendered in such a way, that the resulting light area is stretched into a circle at the edges, which makes it hard for the blob detector to get an accurate position and size.

I can get around this by rendering the same values, but with the spherical angles (phi and theta) representing the rows and columns of an images, which gives the bottom image:

With this I have more concise areas, however as we can see, rendered onto a sphere, the above would only be a single light area and a smaller dark area. What I want is to the blob for this single dark area. Is there a built-in option in opencv for that, or do I have to do it manually, for example by repeating the texture on the edges or similar?

I’d pick an equirectangular projection and just find maxima (assuming it’s not clipping).

I understand everything upto the images, but I don’t understand what exactly you need out of these pictures. one time you say there’s a light source and that should be a location. but then you say you want the dark areas… but that can’t in principle be a single solid area (it has the light spot inside of it), and I don’t see why you’d need the dark area.

@crackwitz Sorry it was my first post here, so it took a few days to unlock to the public. In the meanwhile I realized, that it is not so much an OpenCV problem but simply a math/geometry problem. I need to calculate a circular area (or rather all the polar coordinates, which create this circle) on the surface on a sphere given the polar coordinates of the center of the circle. So right now as far as OpenCV is concerned I guess, my issue is solved :slight_smile: