Forums - Issues with fcvFindContoursExternalu8

2 posts / 0 new
Last post
Issues with fcvFindContoursExternalu8
casey.mccandless
Join Date: 20 Mar 21
Posts: 2
Posted: Thu, 2023-03-09 08:50

(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.

  • Up0
  • Down0
casey.mccandless
Join Date: 20 Mar 21
Posts: 2
Posted: Thu, 2023-03-09 09:15

This is on FastCV 1.7.1 run on an msm8953 running android 8 32bit

  • Up0
  • Down0
or Register

Opinions expressed in the content posted here are the personal opinions of the original authors, and do not necessarily reflect those of Qualcomm Incorporated or its subsidiaries (“Qualcomm”). The content is provided for informational purposes only and is not meant to be an endorsement or representation by Qualcomm or any other party. This site may also provide links or references to non-Qualcomm sites and resources. Qualcomm makes no representations, warranties, or other commitments whatsoever about any non-Qualcomm sites or third-party resources that may be referenced, accessible from, or linked to this site.