I am working on a film negative scanner for the national library of Norway.
This is a non profit project to try to get scanning of slides more automated.
What we want to achieve is to use the OpenMV-cam to see when a slide is in front of a DSLR camera.
We use a Arduino to drive a stepper motor witch in turn moves the film strips in front of the dslr/openmv.
The with of each image is constant, but the space between the images can vary.
So we need something that can detect rectangles or image content.
A row of slides looks like this:
First step was to use the find rect function with filtering on width and height. On high contrast images it worked fine, but on low contrast images it did not work.
Manual exposure was also set.
What the ompenmv is seeing:
Next was to boost the contrast, and defined a region of interest. The detection got better, but worked only about 60% of the time.
Then we thought what if we make the images binary. So that we did.
Now the rectangles are crisp, but the find rect does only recognize about 70-80% of the images.
How come the rectangles are not detected? It cant get better than this.
I do not know what to do next.
Should we train a neural network, or can we do something simpler like templates?
We would need between a minimum of about 10-20 fps.
Any thoughts on what to try next?
This is a picture
This is not a valid picture
This is the film base that the images are printed on.
This is when no film is in the scanner