Line tracking through shadows with H7

I am working on a robot that uses the H7s to detect white lines on pavement outdoors. I have trouble when shadows are cast across the camera view by the robot. The robot mistakes the bright strip at the edge of the image for a line. Looking for any suggestions for filters or lenses that might help correct for this. I’ve tried the gaussian filter and grayscale and several colored filters to see if it helps with the light correction, but so far, I haven’t had any luck.

Hi, can you provide some example picture’s from the camera’s frame buffer? Just right click on the picture in the IDE to save the image.

unfortunately, it’s not allowing me to upload anything for some reason.

What’s the error? Too new of a user? Or, do you need to put it in a zip file?

it was too new of a user but this may work

Hi, that’s a super easy problem for the camera. Just use color thresholding via binary() to threhsold the image and then errode() noise pixels away. If you are having an issue with shadows you need to adjust the brightness threshold to be more tolerant.