I want to make a little box, with a camera in it, that will be positioned to look at a vehicle dashboard. More likely, it will look at a portion of the dashboard where the gear selection will be shown. Nearly all automatic transmissions will show PRNDL on the dash. A lot of manual transmissions will also show gear number. But for now I will focus just on PRNDL.
It needs to detect the selected gear and then there will be some kind of output to denote the gear selected to another system. Maybe it will be simply combination of digital outputs to start.
My plan:
I thought about OCR, but actually some vehicles will show PRNDL all the time and simply "light up" or "draw a box" on the selected gear. So OCR will probably not work so well. My plan was to "teach" what each of "P", "R", "N", "D" will look like. Store this in memory (or SD card) and then when requested an image can be taken and cross correlated with stored images and highest correlation wins. It does not need to be high-refresh rate. I think 1 image per second is fine.
I have prototyped this is MATLAB but of course that is too bulky (requires money, laptop etc). On my MATLAB i did require ability to crop out unwanted image area. And I got good results simply using greyscale and binary image (threshold) conversion.
So maybe I need:
Arduino Board
compatible camera (does not need to be high resolution)
LCD display to show what camera is looking at
some kind of 4 or 5 button D-pad that might allow user to adjust a cropping box on the image and "OK" it.
My questions:
is this feasible with Arduino? (functions like cross correlation in 2-dimensions)
Yes this is also an option. This would be fine for certain types of work. However, a solution that didn't interfere with the vehicle at all is also needed. Hence "looking" at the dash as a general solution.
I guess I will have to look at reducing images to smaller size. I don't know what will work just yet, but suspect 640x480 will be too big (and unnecessary).
Pure listening to the CAN bus doesn't interfere with the bus activity. I've got devices waiting for doing just that with a simple UNO. Your approach needs a much more powerful controller regarding large memory and high execution speed. To me it looks like a huge overkill.
Yes that is true and is something we could do already with existing hardware. But with respect... not all vehicles will have this data and if it does we may not be able to pinpoint it without OEM help. We may not want to alert OEM to what is happening hence hands off approach. Also by not plugging into OBD port we can be sure the vehicle is not going to invoke some special mode because it thinks it is being tested. I know VW were found out on this, but we would not be surprised to find cheats in the systems still.
Yes the plan isn't to store for all cars or even have NN to recognise all cars. It will be a case of you must teach the individual P R N D for the current use and then when finished, it is all wiped. As mentioned this is already proven out with MATLAB so I know it works. It just needs something less bulky and more "product" like.