I have an RBG picture that I want to convert into HSV. I want to save the H, S, and V values into 3 separate images. How would I do it?
My current code consists of just converting the RGB image to HSV:
#include "opencv2/imgproc.hpp"
#include "opencv2/imgcodecs.hpp"
#include "opencv2/highgui.hpp"
#include <iostream>
#include <unistd.h>
using namespace cv;
using namespace std;
Mat img_hsv, img_rgb;
img_rgb = imread("pic.png", 1);
cvtColor(img_rgb, img_hsv, COLORMAP_HSV);