Can openMV has the capacity to achieve this project?

General discussion about topics related to OpenMV.
Rex
Posts: 2
Joined: Fri Mar 31, 2017 6:08 am

Can openMV has the capacity to achieve this project?

Postby Rex » Fri Mar 31, 2017 6:42 am

Hi Guys,
i want to make an instrument which can detect two row arrays holes. it may like below picture:
hole detection.png
hole detection.png (20.01 KiB) Viewed 4302 times
attachment details:
1.the captured FOV maybe need to be limited within red block.
2.black hole means :binary 1
3.white hole( actually ,no hole) means : binary 0
4.the diameter of hole is 1mm. i am not sure the resolution of openMV can achieve this.
so i want use openMV to detect and decode this picture as :1101110110110111101110111,1110111101110111111011111. so can i make it?
could any kindly help to estimate whether it can be true ? thanks very much!
User avatar
deshipu
Posts: 74
Joined: Sat Jan 09, 2016 5:36 am
Location: Zürich
Contact:

Re: Can openMV has the capacity to achieve this project?

Postby deshipu » Fri Mar 31, 2017 10:05 am

Is the thing in which the holes are fixed in relation to the OpenMV camera, or can any of them move? Are the lighting conditions constant, or can they change? If they change, can you provide your own light?
User avatar
deshipu
Posts: 74
Joined: Sat Jan 09, 2016 5:36 am
Location: Zürich
Contact:

Re: Can openMV has the capacity to achieve this project?

Postby deshipu » Fri Mar 31, 2017 10:06 am

If the holes are fixed in relation to the camera, then it should be very easy to do.
User avatar
kwagyeman
Posts: 4665
Joined: Sun May 24, 2015 2:10 pm

Re: Can openMV has the capacity to achieve this project?

Postby kwagyeman » Fri Mar 31, 2017 10:30 am

Yes, so if the holes are in a fixed location relative to the camera you can take a picture and just use the get_stats() method on an image to grab image stats for regions of interest where the holes should be. You just have to record the position of each region you want to look at. The get_stats() method will tell you if the area you're looking at is dark or light, etc.

If the strip is not in a fixed location and can be rotated then this is much harder and you might want to use a regular barcode which we support decoding of in a very robust way.
Nyamekye,
Rex
Posts: 2
Joined: Fri Mar 31, 2017 6:08 am

Re: Can openMV has the capacity to achieve this project?

Postby Rex » Fri Mar 31, 2017 8:50 pm

Hi deshipu&kwagyemn
thanks your help!
i think it is hard to keep holes at the fixed location ,the device must be a handheld device, but the relative location of all the should be fixed.
i am not going to use ir-led ,and I want take grayscale image, i wiil provide enough brightness light for it .
so can I use image.find_template to get location of all the holes? I think the max number of holes is up to 60
i also worried about the resolution of ov7725,is it enough to make this?
the barcode, but it is a standard decoding/encoding format, seems my intent is for private decoding /encoding
User avatar
kwagyeman
Posts: 4665
Joined: Sun May 24, 2015 2:10 pm

Re: Can openMV has the capacity to achieve this project?

Postby kwagyeman » Sun Apr 02, 2017 2:22 pm

Sorry for not getting back to this post.

If this barcode is of your own design I would scrap it. The reason I say this is because you're not bringing in any of the techniques used by 2D barcodes to be "scannable" by a camera. In particular, all 2D barcodes have a ton of error correcting codes to be readable. Usually, very high level math stuff. https://en.wikipedia.org/wiki/Reed%E2%8 ... correction

Anyway, beside that 2D bar codes also include some kind of finder pattern which can be detected cheaply and easily on a raw image. For example, QR codes have 3 finder patterns on their edges to make finding them possible. The finder patterns also allow the software to then de-rotate the qr code in 3D space so the bits on it can be scanned.

The barcode format you've proposed doesn't do any of this so it will only work if the camera is in a fixed position relative to the code.

...

If you wanted to continue down the path of implementing your own barcode format the OpenMV Cam could scan it but you'd need to write the whole library in C. I'd expect you to also be somewhat of master at doing this type of stuff as you're looking at a 4-6 thousand line function. You could look at our QR Code and AprilTag code to get started. But, you're looking at a lot of work.

...

If possible, just use a linear barcode which the M7 camera will be able to scan. Or, if you wait a bit I'll have libdtmx ported over for data matrix support to round out the OpenMV Cam's barcode library. Otherwise, just use a QRCode.

At the end of the day unless someone knows what the value a 1D/2D barcode means it doesn't really matter if they can read it. It still has to be inputted into a system that can parse the data value. For example, all codes stored could be encrypted strings.
Nyamekye,
User avatar
kwagyeman
Posts: 4665
Joined: Sun May 24, 2015 2:10 pm

Re: Can openMV has the capacity to achieve this project?

Postby kwagyeman » Mon Apr 03, 2017 10:37 pm

Rex,

Please stop reporting posts and putting your reply in the report. This is not how you use the forum. You've reported posts 3 times now. Please stop it. Click the post reply button on the bottom of the forum page to post a reply.

...

You're previous reply had this message:

thanks, i am not going to work so deeply , i have change my holes to a rectangle with 1mm width an 4mm height。
by the way, i trying to use copy module to copy list and list.sort function to sort a 2D list, but seems both failed, current micro python is 1.8, it didn't support them?

...

Use the sorted() function. As in sorted(list) returns a sorted list. For some reason calls to the list object don't work directly. I guess this is because we're on MP 1.8.0 and not 1.8.7.
Nyamekye,

Return to “General Topics”

Who is online

Users browsing this forum: No registered users and 2 guests