quadgen
quadgen

Reputation: 80

Converting a hsv image to 3 channels

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.

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.

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

Upvotes: 0

Views: 924

Answers (1)

Rick M.
Rick M.

Reputation: 3115

For java you could do something like this:

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.

Upvotes: 3

Related Questions