In attached files, you find an image and a program that I wrote to explain my problem
Can you tell me why the results of image.statistics (i, j, 1,1) are not equivalent to the image.rgb_to_lab () conversion function?
Why are not the circles drawn in blue on the test image?
The image.statistics function works perfectly in (sensor.GRAYSCALE)
tests_OpenMV02_imgStats.py (2.62 KB)
At job currently, will look at this tonight. What’s the magnitude of the difference?
The difference is important because image.statics () returns similar values for the three colors,
and the figures draw are only in white.
Sorry for the derangement, later
I know the problem!
Stats has to be passed an roi=(i,j,1,1).
MP doesn’t really handle telling you you’re passing arguments to the function incorrectly. Currently, the stats function in your code is ignoring all arguments.
That’s right, thank you for this debug, on the other hand what do you think for the circle that remains white when it should be blue?
You have to pass the color as a keyword argument:
img.draw_circle(i, j, 12, color=color)
Please call the color tuple not “color” too. Call it red, etc.
Please pay attention to the keyword arguments. If you don’t explicitly say the keyword then the argument is ignored.
We can actually make the function forgiving us this in the firmware, but, it gets rather tricky when you have multiple keyword arguments, etc. In the future I suppose the firmware will be built to be more forgiving.
Thanks for your quick and efficient replies, good night