hi,
iam using openmv cam m4 and in this lilnk( http://docs.openmv.io/library/omv.image.html ) you have given that blob.cx() will Return the centroid x position of the blob.My doubt is that suppose if i track red colour object and i vary the distance from red coloured object to openmv cam upto what extent the cam will give accurate blob.cx() value.
thank you,

ohh, thank you sir but in my project i have to find the position of different white coloured and red coloured objects at one shot how can i do that by using openmv kindly help me to overcome this problem.
thank you,

thank you very much sir,So in order to calculate the distance of various blobs we need not to calculate angle of field of view, Field of view and all .openmv cam itself will give the correct position of different blobs.

Hi, it's not really possible to get the distance to and object using just one camera and vision reliablely. The size of the object on screen is related to the distance in a 1/d^2 way. E.g. as the object gets farther away the number of pixels in the object changes minimally related to the distance. That said, if the object is really close the relationship is linearish then and you can use a lookup table to map pixels to distance (or a piece wise linear function).

Whatever the case, you have to hand calculate the piece wise lookup table by measuring the object at each distance and recording the number of pixels. Then, you build interpolate any new pixel value to a distance between whatever measurements you made previously. In code this looks like a bunch of if statements.

hi,somehow blob.cx() gives the approximate value its enough for me.In my project i have to take the snapshot and than i have to send the different blob.cx() value to the raspberry pi how can i do this.

hi,somehow blob.cx() gives the approximate value its enough for me.In my project i have to take the snapshot and than i have to send the different blob.cx() value to the raspberry pi how can i do this.