Esempio n. 1
0
Image::Ptr Image::getGrayscale( void ) const
{
    if ( !isGrayscale() ) {
        // TODO: Has the image, if not grayscale, really three channels then?
        return CvtColor( CV_RGB2GRAY, 1, depth);
    } else {
        return Clone();
    }
}
Esempio n. 2
0
 /**
  * Tests to see if the input image is not grayscale and has more than three
  * samples per pixel, implying RGBA.
  *
  * @return True if the image is RGBA, false otherwise
  */
 bool TiffImporter::isArgb() const {
   return !isGrayscale() && samplesPerPixel() > 3;
 }
Esempio n. 3
0
/**
 * This method converts the image to grayscale.
 *
 * @return true if the image was converted to grayscale, else false
 */
bool fipImage::convertToGrayscale(){

	pImageData = FreeImage_ConvertToGreyscale( pImageData );
	
	return isGrayscale();
}