(seems images do not show in view, however when I edit this comment they are there?)
When running fcvFindContoursExternalu8, it never produces what I would expect as contours. Given the following image https://github.com/caseymcc/imageStore/raw/main/base.ppm
it will generate this (where each greyscale value is a different contour)
https://github.com/caseymcc/imageStore/raw/main/contour_width.ppm
if the scratch size is allocated to the width of the image. If I give the scratch more space width*height I get this
https://github.com/caseymcc/imageStore/raw/main/contour_width_height.ppm
however as you can see from the greyscale, every line is an individual contour. It also alters the original image provided, It starts off as the top image but if you check the image after the run you get.
https://github.com/caseymcc/imageStore/raw/main/base_after.ppm
what is hard to tell in that image is the areas that would have been solid (255) are now set to 2, and the end of each lline of 2s is marked with the 255 seen above. I have tried fcvFindContoursListu8 but it gives similar results. fcvFindContoursTreeu8 and fcvFindContoursCcompu8 seem not to work.
All of the images, contour points, start points, hierachy, etc.. are allocated with fcvMemAlloc with 16 as the alignment size. Scratch uses fcvFindContoursAllocate. If I try to use fcvMemInit or fcvMemInitPreAlloc when fcvSetOperationMode is set to FASTCV_OP_CPU_PERFORMANCE, then it crashes. If I set fcvSetOperationMode to FASTCV_OP_PERFORMANCE then I can use fcvMemInit but if I ever call fcvMemFree it crashes. I am using several other fastCV functions with no issues, just seems to be the contour ones that are not working.
This is on FastCV 1.7.1 run on an msm8953 running android 8 32bit