tags:

views:

50

answers:

0

hi all,

I use CImg for my image processing work. I work only on Gray Scale JPG, BMP, TIFF images presently. the problem i am facing with CImg function is as follows:

CImg stores the Pixel values in the following way. R1R2R3R4............G1G2G3G4.........B1B2B3B4.........

Even for grey scale images, 3 different channels are created separately. This makes my work very complicated. Just for copying values from one image to another, i need to copy all the components of the pixels. I need to iterate across all the channels which make my algorithm slow.

Since i work only with grey scale images it does not matter to me whether it is single channelled or multichannelled.Is there a way to convert 3 channelled image to single channelled in CImg. Please let me know asap.

Thank you all in advance