将hsv图像转换为3个通道

时间:2021-01-22 21:24:12

I have a mat image in HSV format and i just want three mat images from it first one of H component ,second one in S component and third one of V component.

我有HSV格式的mat图像,我只想要三个mat图像,第一个是H组件,第二个是S组件,第三个是V组件。

I search around but could not found any JAVA code for it .thanks in advanced.Sorry I could not provide any code because i could't even know which method or class to use.

我搜索周围,但找不到任何JAVA代码。谢谢高级。我无法提供任何代码,因为我甚至不知道使用哪种方法或类。

Is any method to split a mat image of HSV format into three Mat Images .

是否有任何方法将HSV格式的mat图像分割为三个Mat图像。

1 个解决方案

#1


1  

For java you could do something like this:

对于java,你可以这样做:

Mat myHSVimage; 
List<Mat> channels = new ArrayList<Mat>(3);
Core.split(mHSVimage, channels);
Mat H = channels.get(0);
Mat S = channels.get(1);
Mat V = channels.get(2);

Please read documentation before posting such questions.

请在发布此类问题之前阅读文档。

#1


1  

For java you could do something like this:

对于java,你可以这样做:

Mat myHSVimage; 
List<Mat> channels = new ArrayList<Mat>(3);
Core.split(mHSVimage, channels);
Mat H = channels.get(0);
Mat S = channels.get(1);
Mat V = channels.get(2);

Please read documentation before posting such questions.

请在发布此类问题之前阅读文档。