ͼ24λɫͼͼ32λҪת24λԵúConvertImage32To24bppConvertImage24To32bpp

pRGBSrcΪԭʼͼصָ
width, heightֱΪԭʼͼĸ߿
lineLenΪͼһصֽ
COLOR_FORMAT_888 24λʽ


μ

        int cornerPoints[ 80 ];
        int count = 0;

        // input src 24bpp image to get detected cornerPoints
        count = DetectBoundLinesColor( pRGBSrc, width, height, lineLen, cornerPoints );

        // ʱصcountΪ⵽ı߿⵽ÿ߿ĸηcornerPointsУÿ߿4㣬ÿintֱΪxyÿ߿8int10ѡ߿cornerPointsΪ80int

        // ÷صĵһ߿DewarpImagePlaneһΪNULLʾͼУȡУ󽫵õͼĴС
        DewarpImagePlane( NULL, width, height, lineLen, cornerPoints, NULL, &widthResult, &heightResult, 0, false );

        // һõͼСͼڴ
        lineLenResult = (widthResult * 3 + 3) / 4 * 4;
        pRGBDst = new unsigned char[ lineLenResult * heightResult ];

        // ԭͼУУͼ
        DewarpImagePlane( pRGBSrc, width, height, lineLen, cornerPoints, pRGBDst, &widthResult, &heightResult, lineLenResult, false );

ͼɫǿ

	EnhanceColorImageByLumination( pRGBDst, width, height, lineLen, COLOR_FORMAT_888 );

