Thread Tools
This thread is privately moderated by Jack Crossfire, who may elect to delete unwanted replies.
Oct 03, 2015, 01:41 PM
Registered User
Jack Crossfire's Avatar
Thread OP

Path following tweeks

In the hardest test video, 2.9825% of the frames failed. Shadows are the hardest. Cloudy days are the easiest, even working quite well at 160x120. Higher resolution improved the results. 4k proved too slow to scan.

Normalization slightly degraded the results. Suspect the best results would come from manually setting the exposure, setting manually tweeked constants based on the exposure & path. The saturation is still manually set. However, it is about capturing the most information & the auto exposure is choosing the exposure that captures the most information.

The key computational user is the chroma key step, with any other step manely free. A different chroma key needs to be applied for each color of the path. Then, the threshold needs to be manually tweeked until the path has the right shape.

Tried dynamically detecting the optimum threshold by applying many thresholds to the same image & measuring the average distance of every mask pixel from the mean mask pixel. The optimum path shape should always have a similar average distance of mask pixels from the center mask pixel. This was slow indeed, but always produced very tight masks. The problem was the threshold converged on a constant value & didn't change in any frames. The return on the investment of clockcycles was minimal.

Also tried finding the thresholds where the total number of masked pixels jumped a certain amount due to a sudden bleeding. This didn't produce consistent results.

Decided averaging many erroneous 160x120 frames would give better results than a smaller number of more accurate 640x480 frames. It screamed at 30fps on the Macbook. On the PI, it was 1fps. There was hope an upgraded ARM could get it to at least 5fps.

Some more ideas:

It might be possible to create a database of optimal chroma keys & thresholds based on past drives, then looking them up based on a histogram of the current image. The good frames of a past drive can be detected based on the average path position.

Another idea was when searching for the edges of the path, take the line with the smallest average distance from the edge instead of the strongest amplitude on the line.
Last edited by Jack Crossfire; Oct 03, 2015 at 01:47 PM.
Sign up now
to remove ads between posts

Quick Reply
Thread Tools