Fix bug introduced in the CalypFrame->toMat function
This commit is contained in:
+2
-1
@@ -1110,7 +1110,8 @@ bool CalypFrame::toMat( cv::Mat& cvMat, bool convertToGray, bool scale, unsigned
|
|||||||
unsigned numBytes = getBitsPel() > 8 ? 2 : 1;
|
unsigned numBytes = getBitsPel() > 8 ? 2 : 1;
|
||||||
unsigned numChannels = getNumberChannels();
|
unsigned numChannels = getNumberChannels();
|
||||||
unsigned scaleFactor = 1 << ( numBytes * 8 - getBitsPel() );
|
unsigned scaleFactor = 1 << ( numBytes * 8 - getBitsPel() );
|
||||||
|
if( !scale )
|
||||||
|
scaleFactor = 1;
|
||||||
if( convertToGray )
|
if( convertToGray )
|
||||||
{
|
{
|
||||||
channel = channel >= numChannels ? 0 : channel;
|
channel = channel >= numChannels ? 0 : channel;
|
||||||
|
|||||||
Reference in New Issue
Block a user