|
Post by angelo2449 on Jan 29, 2020 14:56:08 GMT -5
Hi guys,
Does anyone know how to proceed for image recognition?
I'll explain :
I would like to point a camera at an object with varying lights and be able to recognize its various states!
Easy?
Tank You.
|
|
|
Post by Rod on Jan 29, 2020 15:23:17 GMT -5
An old project of mine. Need to blow the dust off it. The first issue is orientation, is the object vertical, on its side, what overall color is it. How big is it and what reference do we have for that size measurement.
Let’s take a banana and an orange and an apple. Two are round one is elongated. One is yellow one is orange and one is red or green. Is there a background? If so we are probably stuffed.
If it is as simple as grabbing a bmp of a light display that never changes its orientation or size then it is probably doable. Grab the image and assess the color in various locations.
John posted some code to his site that looks for variations in a bmp to trigger an alarm if they differed too much.
Posting the exact task would get you better information.
|
|
|
Post by angelo2449 on Jan 29, 2020 16:02:37 GMT -5
The images are two, three at most and differ from each other by the lighting of two LEDs.
|
|
|
Post by Rod on Jan 29, 2020 16:10:43 GMT -5
If you must do it by image and the camera is fixed and the led positions fixed then it is just a case of grabbing a bmp and getting the bmp pixel color for the area that shows the led. There are a couple of examples of grabbing images, the LBPE has some code.
|
|
|
Post by tenochtitlanuk on Jan 29, 2020 18:11:38 GMT -5
|
|
|
Post by angelo2449 on Jan 30, 2020 0:59:40 GMT -5
Thanks tenochtitlanuk, The programs you have indicated to me perform exactly the function I want. So it is not necessary to compare two images but to control the color of a part of the object framed by the camera. Instead of a video camera it could be a photo camera that takes a photo every one or more seconds. Now the problem is to get the photo and pass it to the program. I am reminded of the use of Arduino but for now, thoughts are still vague. What do you think ? Thank you.
|
|
|
Post by tsh73 on Jan 30, 2020 4:06:54 GMT -5
|
|
|
Post by tenochtitlanuk on Jan 31, 2020 15:15:31 GMT -5
I didn't mention two more of my pages at www.diga.me.uk/TimeLapse.html and at www.diga.me.uk/CamParer.html because I work on Linux, where I didn't get them to run, and wanted first to confirm they work on Windows 10- which it turns out they do. They illustrate grabbing webcam images and manipulating them. I have been a great fan of calling ImageMagick from LB as well as from the command line- I have other pages on that too. Just visit my LB site homepage.. I haven't tried Anatoly's mentioned utility, but any software like that which can save images to disk can provide images for analysis. I used to use ramdisk for this, because any saved images are automatically deleted when you switch off the computer!
|
|
|
Post by angelo2449 on Feb 1, 2020 0:47:02 GMT -5
To get the desired result, I went the wrong way by focusing on using a camera. In fact, there is the possibility of reading the color of the light emitted by one or more LEDs with a special sensor (TCS3200). This way is much simpler and with few electronic components and a little software, I think I can solve the problem. We will talk to you next time, thanks.
|
|
|
Post by tenochtitlanuk on Feb 1, 2020 5:35:34 GMT -5
I nearly suggested that- when I was playing tn years ago they were not readily available. Let us know how you get on.. Buona fortuna!
|
|