0
  1. I have original RGB image.
  2. then, I convert it to gray scale.
  3. then, I assign new threhold value into some pixel.
  4. then, I need to convert the gray scale image from step#3 to RGB image.

I am trying on the step#4. Could you help to advise?

Amro
  • 121,265
  • 25
  • 232
  • 431

1 Answers1

1

Check out rgb2hsv and hsv2rgb in matlab. Then threshold on the value matrix. This makes more sense to me.

Another possibility is to convert to grey scale but keep the original colour image. Then create a mask by thresholding the grey scale image and use that mask to discard the pixels above/below your threshold on the colour matrix.

Dan
  • 43,452
  • 14
  • 75
  • 140