simplify code, implement brightness correction and relative coordinates. the R scrit now works. need to implement post processing filtering