File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -308,6 +308,11 @@ void write_pixel( const double& pixelValue,
308
308
// input: 4 channel, output: 4 channel
309
309
else if ( gdalChannels == 4 && image.channels () == 4 ){
310
310
if ( image.depth () == CV_8U ){ image.at <Vec4b>(row,col)[channel] = newValue; }
311
+ else if ( image.depth () == CV_16U ){ image.at <Vec4s>(row,col)[channel] = newValue; }
312
+ else if ( image.depth () == CV_16S ){ image.at <Vec4s>(row,col)[channel] = newValue; }
313
+ else if ( image.depth () == CV_32S ){ image.at <Vec4i>(row,col)[channel] = newValue; }
314
+ else if ( image.depth () == CV_32F ){ image.at <Vec4f>(row,col)[channel] = newValue; }
315
+ else if ( image.depth () == CV_64F ){ image.at <Vec4d>(row,col)[channel] = newValue; }
311
316
else { throw std::runtime_error (" Unknown image depth, gdal: 4, image: 4" ); }
312
317
}
313
318
@@ -574,4 +579,4 @@ bool GdalDecoder::checkSignature( const String& signature )const{
574
579
575
580
} // / End of cv Namespace
576
581
577
- #endif /* *< End of HAVE_GDAL Definition */
582
+ #endif /* *< End of HAVE_GDAL Definition */
You can’t perform that action at this time.
0 commit comments