Page 1 of 1

Create Empty Image Object without using Sensor or Reader

Posted: Thu Dec 13, 2018 1:20 am
by satbirsoni
This is useful in Unit testing, where there is no hardware available.
I would like to test my image processing chain with a lot of scenarios.

Currently, there is no way to create an without using sensor or Image reader.

Please suggest.

Re: Create Empty Image Object without using Sensor or Reader

Posted: Thu Dec 13, 2018 1:31 am
by kwagyeman
Hi, What platform are you running on where this is an issue? Yes, there's definitely no way to create an empty image object. But, if you want a pure black image of a particular size it's not hard to get with the current methods. Just set the res to whatever you need, set the windowing to the fine grained res, and then clear the image after you get it.

Re: Create Empty Image Object without using Sensor or Reader

Posted: Thu Dec 13, 2018 5:22 pm
by satbirsoni
Thanks Nyamekye,

I run my unit test on Unix build of Micropython.

Most of Open MV functions are hardware independent. Like rotate an image, Flip an Image.
It easy to unit test them on pre-defined data.

I will submit a PR for this! Thanks

Regards
Satbir