Create Empty Image Object without using Sensor or Reader

General discussion about topics related to OpenMV.
satbirsoni
Posts: 3
Joined: Thu Dec 13, 2018 1:17 am

Create Empty Image Object without using Sensor or Reader

Postby satbirsoni » Thu Dec 13, 2018 1:20 am

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.
User avatar
kwagyeman
Posts: 3441
Joined: Sun May 24, 2015 2:10 pm

Re: Create Empty Image Object without using Sensor or Reader

Postby kwagyeman » Thu Dec 13, 2018 1:31 am

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.
Nyamekye,
satbirsoni
Posts: 3
Joined: Thu Dec 13, 2018 1:17 am

Re: Create Empty Image Object without using Sensor or Reader

Postby satbirsoni » Thu Dec 13, 2018 5:22 pm

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

Return to “General Topics”

Who is online

Users browsing this forum: No registered users and 4 guests