Skip to content

Commit

Permalink
Fix ChannelID error value.
Browse files Browse the repository at this point in the history
  • Loading branch information
fullset committed Oct 15, 2019
1 parent 194ea88 commit 614975a
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions test/unit_tests/unit_test_image_function.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -652,7 +652,7 @@ namespace Function_Template
PenguinV_Image::Image input = uniformRGBImage( intensity[0] );
fillImage( input, 0, 0, input.width(), input.height(), intensity );

const uint8_t channelId = randomValue<uint8_t>( 3 );
const uint8_t channelId = randomValue<uint8_t>( 2 );

const PenguinV_Image::Image output = ExtractChannel( input, channelId );

Expand All @@ -665,7 +665,7 @@ namespace Function_Template
PenguinV_Image::Image input = uniformRGBImage( intensity[0] );
fillImage( input, 0, 0, input.width(), input.height(), intensity );

const uint8_t channelId = randomValue<uint8_t>( 3 );
const uint8_t channelId = randomValue<uint8_t>( 2 );
PenguinV_Image::Image output = uniformImage( input.width(), input.height() );

ExtractChannel( input, output, channelId );
Expand All @@ -679,7 +679,7 @@ namespace Function_Template
PenguinV_Image::Image input = uniformRGBImage( intensity[0] );
fillImage( input, 0, 0, input.width(), input.height(), intensity );

const uint8_t channelId = randomValue<uint8_t>( 3 );
const uint8_t channelId = randomValue<uint8_t>( 2 );

uint32_t roiX, roiY;
uint32_t roiWidth, roiHeight;
Expand All @@ -696,7 +696,7 @@ namespace Function_Template
PenguinV_Image::Image input = uniformRGBImage( intensity[0] );
fillImage( input, 0, 0, input.width(), input.height(), intensity );

const uint8_t channelId = randomValue<uint8_t>( 3 );
const uint8_t channelId = randomValue<uint8_t>( 2 );
PenguinV_Image::Image output = uniformImage();

std::vector < std::pair <uint32_t, uint32_t> > size( 2 );
Expand Down Expand Up @@ -867,8 +867,8 @@ namespace Function_Template
uint32_t roiWidth, roiHeight;
generateRoi( image, roiX, roiY, roiWidth, roiHeight );

const bool horizontalFlip = (randomValue<uint32_t>( 0, 2 ) == 0);
const bool verticalFlip = (randomValue<uint32_t>( 0, 2 ) == 0);
const bool horizontalFlip = (randomValue<uint32_t>( 0, 1 ) == 0);
const bool verticalFlip = (randomValue<uint32_t>( 0, 1 ) == 0);
const uint32_t xCorrection = roiWidth % 2;
const uint32_t yCorrection = roiHeight % 2;

Expand Down Expand Up @@ -1642,7 +1642,7 @@ namespace Function_Template

output.fill( intensity[1] );

const uint8_t channelId = randomValue<uint8_t>( 3 );
const uint8_t channelId = randomValue<uint8_t>( 2 );

ReplaceChannel( input, output, channelId );

Expand All @@ -1667,7 +1667,7 @@ namespace Function_Template
uint32_t roiWidth, roiHeight;
generateRoi( size, roiX, roiY, roiWidth, roiHeight );

const uint8_t channelId = randomValue<uint8_t>( 3 );
const uint8_t channelId = randomValue<uint8_t>( 2 );

ReplaceChannel( input, roiX[0], roiY[0], output, roiX[1], roiY[1], roiWidth, roiHeight, channelId );

Expand Down

0 comments on commit 614975a

Please sign in to comment.