ruhRP
Posts: 1
Joined: Sun Sep 19, 2021 5:34 pm

Object colour detecting and finding matching colour from catalog

Sun Sep 19, 2021 5:50 pm

Hello, I'm a complete newbie to Raspberry pi.
My project/job is based on Raspberry pi 3.
The project is about implementing the following:
To plan and build an automatic (video) camera based device which sample colours from cars/walls or existing objects who finds the matching colour from a colour catalog.
The device helps to choose a matching colour which fits colour fixes.
The sample will be made using a video camera and the system will find the colour from a data base catalog.
The controller system will include an algorithm that detect the filmed colour (real time) and will present the colour name and it's catalog number.

The equipment I posses:

Raspberry pi controller (3B)
3.5inch portable TFT LCD (480x320) touch screen
Ultrasonic distance sensor [HC-SR04](3cm - 3.5m distance) - to make sure the camera is not too far (I guess :) )
Raspberry pi Camera - board v1.3 (5MP resolution), Stills resolution: 2592x1944, video resolution: 1080p 30fps / 720p 60fps
LDR (photosensitive sensor module 5v/3.3v, 15mA) - to check if Flash is needed when it's dark.
Flash lighting - White bright LEDS that will turn on in case the lighting conditions will require that.

So after all of that, where you guys think I should start?
So far I'm considering how to make the colour detection based on a catalog (and how on earth I can fix colours).

scotty101
Posts: 4294
Joined: Fri Jun 08, 2012 6:03 pm

Re: Object colour detecting and finding matching colour from catalog

Mon Sep 20, 2021 1:34 pm

Not sure you need the LDR. You have a camera that is perfectly suitable for reading the light levels.


One major thing to consider is calibration. You should have some "test cards" with known colors on them to calibrate the camera/sensor against.
I used to work in a photo lab and we had to colour test our machines each morning and the devices we used positioned the camera/sensor as close to the test card as possible to prevent external light source/reflections etc from interfering with the reading.

As such, I'm not sure you need to ultrasonic sensor either, if you device isn't touching the object you want to check, it is probably too far away and you'll get inaccurate readings.
Electronic and Computer Engineer
Pi Interests: Home Automation, IOT, Python and Tkinter

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 29621
Joined: Sat Jul 30, 2011 7:41 pm

Re: Object colour detecting and finding matching colour from catalog

Mon Sep 20, 2021 2:08 pm

scotty101 wrote:
Mon Sep 20, 2021 1:34 pm
Not sure you need the LDR. You have a camera that is perfectly suitable for reading the light levels.


One major thing to consider is calibration. You should have some "test cards" with known colors on them to calibrate the camera/sensor against.
I used to work in a photo lab and we had to colour test our machines each morning and the devices we used positioned the camera/sensor as close to the test card as possible to prevent external light source/reflections etc from interfering with the reading.

As such, I'm not sure you need to ultrasonic sensor either, if you device isn't touching the object you want to check, it is probably too far away and you'll get inaccurate readings.
Called a Macbeth Chart, other charts are available.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Working in the Applications Team.

Return to “Automation, sensing and robotics”