Displaying image and converting to grayscale - OpenCV for Android, Java API

前端 未结 4 1018
陌清茗
陌清茗 2021-02-06 18:07

I\'m writing an Android app in Eclipse that uses the OpenCV4Android API. How can I display a Mat image easily, for debugging only? In C++, according to the OpenCV

4条回答
  •  甜味超标
    2021-02-06 18:48

    but the Java API for Android doesn't seem to have a namedWindow function inside org.opencv.highgui.Highgui.

    Because you have to show your image on View. Take a look at samples from WEB.

    Also, I'd like to load the image as grayscale.

    Use cvCvtColor with code CV_BGR2GRAY for such type of convertion.

提交回复
热议问题