ANDROID - color detection using openCV - how to?

前端 未结 4 1292
谎友^
谎友^ 2021-01-31 12:56

my goal is to display a threshed image using the HSV color space in a way that only yellow objects will be shown. i use this code (based on a code given by the openCV 2.3.1 andr

4条回答
  •  不思量自难忘°
    2021-01-31 13:05

    I think mHSVThreshed is a binary mat

    so maybe this line :

    Imgproc.cvtColor(mHSVThreshed, mRgba, Imgproc.COLOR_HSV2RGB, 0);
    

    should change to :

    Imgproc.cvtColor(mHSVThreshed, mRgba, Imgproc.COLOR_GRAY2RGB, 0);
    

    I spent a lot of time dealing with the "showing" problem too...

    hope this help...

提交回复
热议问题