I am trying to implement simple line following on a robot that uses an android camera as its sensor. My idea is to take any given frame and search only a horizontal strip for the color black, then get information on how far left/right that black is from center. For example, if the input frame is this:
then the program should search some thin horizontal strip (like the blue one in the picture) for black. When it finds it it reports that the black line is to the right of center by x amount.
I think that this should be written into the onCameraFrame() method, but i am not sure where to go from there. Specifically i need to know how to search a submat for a concentration of black and report its position.