add arrSegment functions.
add arrFindMarkers,arrFindEdgesInRegion. TODO: make it complied.