I'm working on a code to track the postion of debris. The code converts the image first to gray scale and then to binary. It then takes the median value of the x-component of all pixels which are black. This gives the approximate x position of the debris (since the debris is darker than the water). However, when light reflects off the block, that portion does not get picked up, shifting the calculated position. Is there a way to adjust for this?