Hey
I am sharing a simple program which convert RGB image into HSV color space. I am handling cv::Mat instead of IplImage.
hsv.cpp
/// HSV Conversion
#include "opencv2/highgui/highgui.hpp"
#include "opencv/cv.h"
#include <iostream>
#include <stdio.h>
using namespace std;
using namespace cv;
int main(int argc,
char *argv[]
)
{
/// input and hsv image variable
cv::Mat input,hsv;
input =imread(argv[1],1);
///hsv conversion
cvtColor(input,hsv,CV_RGB2HSV);
///displaying hsv and input
cv::imshow("hsv",hsv);
cv::imshow("input",input);
waitKey();
return 0;
}



