1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-30 07:43:03 +04:00

feat: change OpenJPEG encoder to lossy with default parameters

This commit is contained in:
Vadim Levin
2020-08-27 15:11:45 +03:00
parent ba147d2be2
commit bce5d364df
2 changed files with 14 additions and 2 deletions
+8 -2
View File
@@ -228,9 +228,12 @@ TEST_P(Imgcodecs_Image, read_write_BGR)
double psnrThreshold = 100;
if (ext == "jpg")
psnrThreshold = 32;
#ifdef HAVE_JASPER
#if defined(HAVE_JASPER)
if (ext == "jp2")
psnrThreshold = 95;
#elif defined(HAVE_OPENJPEG)
if (ext == "jp2")
psnrThreshold = 35;
#endif
Mat image = generateTestImageBGR();
@@ -254,9 +257,12 @@ TEST_P(Imgcodecs_Image, read_write_GRAYSCALE)
double psnrThreshold = 100;
if (ext == "jpg")
psnrThreshold = 40;
#ifdef HAVE_JASPER
#if defined(HAVE_JASPER)
if (ext == "jp2")
psnrThreshold = 70;
#elif defined(HAVE_OPENJPEG)
if (ext == "jp2")
psnrThreshold = 35;
#endif
Mat image = generateTestImageGrayscale();