Commit Graph

195 Commits

Author SHA1 Message Date
Alexander Alekhin
f943261847 Merge pull request #10566 from alalek:jasper_checks 2018-01-10 10:15:41 +00:00
Alexander Alekhin
435a3e337b imgcodecs: add more Jasper checks for supported and tested cases 2018-01-09 19:06:03 +03:00
Alexander Alekhin
8a76fadaa3 imgcodecs: add overflow checks 2018-01-09 18:05:24 +03:00
Alexander Alekhin
be5247921d imgcodecs: remove assert() usage 2018-01-09 17:49:38 +03:00
Alexander Alekhin
f0453bd853 build: eliminate warning
warning: 'layout.channel_layout::gchan' may be used uninitialized in this function [-Wmaybe-uninitialized]
2018-01-05 04:33:30 +00:00
Coralie RACHEX
16821b877c Merge pull request #10493 from RachexCoralie:tiff32FC1Codec
* Load and save tiff images in CV_32FC1 format (1 channel of floats).

* Add test

* Fix error handling and resources leak. Improve test.
2018-01-04 15:51:58 +03:00
Alexander Alekhin
4ca89db22d imgproc(hdr): fix bounds check in HdrDecoder::checkSignature() 2018-01-01 13:12:21 +00:00
Alexander Alekhin
ec32022bdf
Merge pull request #10444 from alalek:fix_asan_imgcodecs 2017-12-28 18:28:29 +03:00
Vinay Sharma
5aac909046 Merge pull request #10352 from vinay0410:write_pbm
* added write as pbm

* add tests for pbm

* imgcodecs: PBM support

- drop additional PBM parameters
- write: fix P1/P4 mode (no maxval 255 value after width/height)
- write: invert values for P1/P4
- write: P1: compact ASCII mode (no spaces)
- simplify pbm test
- drop .pxm extension (http://netpbm.sourceforge.net/doc/ doesn't know such extension)
2017-12-28 17:28:34 +03:00
Alexander Alekhin
4f6c493b87 imgcodecs(png): resolve ASAN issue with vars scope and setjmp() call 2017-12-28 02:43:07 +00:00
Tomoaki Teshima
fe7b3f1228 clean up the code
* disable the warning in CMake, not int the code using pragma
2017-12-22 08:42:21 +09:00
Alexander Alekhin
7bbe1a53cf imgcodecs(pxm): fix memcpy size 2017-12-21 01:10:24 +00:00
zhijackchen
6df8ac0342 Merge pull request #10283 from zhijackchen:exr_export
* Fix issue #10114
Convert table change
From:
CV_8U -> HALF
CV_8S -> HALF
CV_16U -> UINT
CV_16S -> UINT
CV_32S -> UINT
CV_32F -> FLOAT
To:
CV_8U -> HALF
CV_8S -> HALF
CV_16U -> UINT
CV_16S -> FLOAT
CV_32S -> FLOAT loss precision
CV_32F -> FLOAT
Signed integer can't be presented well with UINT. Even adjust bias, CV16S and CV32S will be confused when load from exr file.
Also fix CV_8S negative value incorrect bug

* EXR import and export
imread() from EXR returns CV_32F only
imwrite() accepts CV_32 cv::Mat only and stores FLOAT images by default. Add imwrite() flag to store in HALF format.

* fix compiling error

* clean up

* fix EXR import issues
2017-12-15 12:23:44 +03:00
Vitaly Tuzov
51cb56ef2c Implementation of bit-exact resize. Internal calls to linear resize updated to use bit-exact version. (#9468) 2017-12-13 15:00:38 +03:00
Maksim Shabunin
7349b8f5ce Build for embedded systems 2017-12-11 13:27:37 +03:00
Maksim Shabunin
7eb1065944 Fixed/disabled warnings produced by GCC 7 2017-11-29 17:21:22 +03:00
gdkessler
2674c6b5e0 Merge pull request #10093 from gdkessler/gdal_image_read_fix_10089
Fix GDAL image decoding color problems identified by issue #10089, by: (#10093)

* Fix GDAL image decoding color problems identified by issue #10089, by:

Fixing CV_8UC1 symbol, which should be CV_8UC3 for RGB GDAL color table images.

Fixing image.ptr<VecX>(row,col)[] to be (*image.ptr<VecX>(row,col))[] to correctly access VecX array elements, as ptr<VecX>() returns a pointer to the VecX, not the first element of VecX. This fixes the color problem with color table gif images, and avoids out-of-bounds memory access.

Respecting the color identification of raster bands provided by the GDAL image driver, and produce BGR or BGRA images. Note that color bands of images using the HSL, CMY, CMYK, or YCbCr color space are ignored, rather than converting them to BGR.

* When reading image files using the GDAL decoder, exit with an error if a color band is encountered that isn't used (eg. from CMYK or YCbCbr), rather than silently ignoring the band's data.
2017-11-20 15:07:24 +03:00
Suleyman TURKMEN
e51a8e047c update grfmt_gdal.cpp 2017-11-08 17:47:43 +03:00
Suleyman TURKMEN
d1c5e79ec3 Update grfmt_gdal.cpp 2017-10-22 19:01:34 +03:00
blendin
08a5fe3661 Fix out of bounds write 2017-10-21 12:12:53 -07:00
berak
089aac61f3 imgcodecs: fix 4 reading channel bmp images 2017-10-01 15:32:55 +02:00
blendin
c58152d94b Fix out of bounds write 2017-09-26 23:04:01 -07:00
Alexander Alekhin
08b5dc64af imgcodecs(tiff): drop legacy code
Drop code under *undefined* HAVE_TIFF
(violates several policies, like a way to turn off tiff support)
2017-09-24 22:36:17 +00:00
Alexander Alekhin
597b3f4456 Merge pull request #9580 from mshabunin:fix-static-6 2017-09-09 19:31:21 +00:00
Alexander Alekhin
9c973144d8 Merge pull request #9595 from paroj:imreadmulti_py 2017-09-08 14:03:03 +00:00
Pavel Rojtberg
2d34443834 python: imreadmulti - add CV_OUT so it is correctly wrapped 2017-09-08 15:09:25 +02:00
Maksim Shabunin
248e2c7d47 Fixed some issues found by static analysis 2017-09-08 12:22:12 +03:00
saskatchewancatch
4832c24ef7 Allow TIFF min=white PHOTOMETRIC interpretation images to be read unchanged 2017-09-05 21:43:33 -06:00
Alexander Alekhin
8f05126619 imgcodecs: fix regression 9376 2017-08-29 13:31:26 +03:00
Alexander Alekhin
91f680aff6 Merge pull request #9448 from alalek:issue_9443 2017-08-24 16:05:08 +00:00
Alexander Alekhin
cc5da83474 Merge pull request #9252 from jbms:fix/tiff-in-memory 2017-08-24 15:33:48 +00:00
Alexander Alekhin
c515e878ab build: eliminate Win32 warnings 2017-08-24 16:07:12 +03:00
Alexander Alekhin
aacae20657 imgcodesc: fix code problems with integer overflow / address arithmetic / UB 2017-08-23 17:27:27 +03:00
Alexander Alekhin
f0fb665407 Merge pull request #9376 from alalek:imgcodecs_refactoring 2017-08-22 16:32:47 +00:00
Alexander Alekhin
b6949c5088 cmake: CMP0022 NEW 2017-08-19 15:15:05 +00:00
Alexander Alekhin
78a310630f imgproc(test): add checks for remove() call 2017-08-16 18:56:42 +03:00
Alexander Alekhin
999f41fb4f imgcodecs: refactoring, improve code quality 2017-08-16 18:56:41 +03:00
Jeremy Maitin-Shepard
350d483a70 grfmt_tiff: support in-memory TIFF encoding and decoding
Previously, only file-based encoding and decoding were supported with
the libtiff library, leading to the possible use of temporary files.

This fixes issue #8483.
2017-07-31 10:22:11 -07:00
Jeremy Maitin-Shepard
2be955a0ef loadsave: check for errors when using temp file
Previously, the return value of fwrite and fclose were not properly
checked, leading to possible silent truncation of the data if writing
failed, e.g. due to lack of disk space.

Fixes issue #9251.
2017-07-31 09:02:42 -07:00
Alexander Alekhin
602f047fe8 build: replace WIN32 => _WIN32 2017-07-25 13:30:48 +03:00
Alexander Alekhin
a4a47b538c build: detect Android via '__ANDROID__' macro
https://sourceforge.net/p/predef/wiki/OperatingSystems
2017-07-10 12:43:59 +03:00
Maksim Shabunin
e0393f8557 Fixed some issues found by static analysis (4th round) 2017-06-30 12:26:53 +03:00
Maksim Shabunin
a769d69a9d Fixed several issues found by static analysis 2017-06-28 18:06:18 +03:00
Maksim Shabunin
32d4af36e2 Fixing some static analysis issues 2017-06-27 14:30:26 +03:00
Alexander Alekhin
006966e629 trace: initial support for code trace 2017-06-26 17:07:13 +03:00
Vadim Pisarevsky
fa7e7e0ff9 Merge pull request #8900 from alalek:update_android_build 2017-06-23 10:58:53 +00:00
Maksim Shabunin
d27009c775 Merge pull request #8856 from mshabunin:media-tests-upgrade 2017-06-22 11:45:52 +00:00
Alexander Alekhin
3e3e2dd512 android: make optional "cpufeatures", build fixes for NDK r15 2017-06-21 13:34:19 +03:00
Maksim Shabunin
87b569d812 Rewritten some tests in videoio and imgcodecs modules
general:
- all iterative tests have been replaced with parameterized tests
- old-style try..catch tests have been modified to use EXPECT_/ASSERT_ gtest macros
- added temporary files cleanup
- modified MatComparator error message formatting

imgcodecs:
- test_grfmt.cpp split to test_jpg.cpp, test_png.cpp, test_tiff.cpp, etc.

videoio:
- added public HAVE_VIDEO_INPUT, HAVE_VIDEO_OUTPUT definitions to cvconfig.h
- built-in MotionJPEG codec could not be tested on some platforms (read_write test was disabled if ffmpeg is off, encoding/decoding was handled by ffmpeg otherwise).
- image-related tests moved to imgcodecs (Videoio_Image)
- several property get/set tests have been combined into one
- added MotionJPEG test video to opencv_extra
2017-06-20 18:20:41 +03:00
Alexander Alekhin
a9cc87636f build: update modules descriptions 2017-06-20 15:45:23 +03:00