Ask Your Question

ahmetkorkmaz's profile - activity

2017-01-14 00:05:21 -0500 commented answer Conversion from RGB to HSI

Great work. But I know that rgb to hsi conversation means h channel takes places of the r channel, s channel takes places of the g channel and i channel takes places of the b channel. In opencv first channel of a pixel of a rgb formatted image is b. The second one is g and the last one is r. I think at the last of your code should be like this:

      hsi.at<Vec3b>(i, j)[2] = (h * 180) / 3.14159265;
      hsi.at<Vec3b>(i, j)[1] = s*100;
      hsi.at<Vec3b>(i, j)[0] = in;

Maybe I thing wrong. Thanks.

2017-01-14 00:05:20 -0500 answered a question Conversion from RGB to HSI

Great work. But I know that rgb to hsi conversation means h channel takes places of the r channel, s channel takes places of the g channel and i channel takes places of the b channel. In opencv first channel of a pixel of a rgb formatted image is b. The second one is g and the last one is r. I think at the last of your code should be like this:

      hsi.at<Vec3b>(i, j)[2] = (h * 180) / 3.14159265;
      hsi.at<Vec3b>(i, j)[1] = s*100;
      hsi.at<Vec3b>(i, j)[0] = in;

Maybe I thing wrong. Thanks.