Commit Graph

17855 Commits

Author SHA1 Message Date
Pavel Rojtberg
afa0f80c61 videoio: add manual white-balance and implement it for V4L2 2018-11-09 17:14:33 +01:00
Alexander Alekhin
596ada51f3 Merge pull request #13080 from alalek:issue_13078 2018-11-09 13:20:27 +00:00
Alexey Nikolaev
8396ae6e4f Merge pull request #12893 from aleksey-nikolaev:cap-update
V4L (V4L2): Refactoring. Added missed camera properties. Fixed getting `INF` for some properties. Singlethread as always (#12893)

* cap_v4l:
1 Added cap_properties verbalization.
2 Set Get of properties elementary refactoring.
3 Removed converting parameters to/from [0,1] range.
4 Added all known conversion from V4L2_CID_* to CV_CAP_PROP_*

* cap_v4l:
1. Removed all query for parameters range.
2. Refactored capture initialization.
3. Added selecting input channel by CV_CAP_PROP_MODE. Default value -1 the channels not changed.

* cap_v4l:
1. Refactoring of Convert To RGB

* cap_v4l:
1. Fixed use of video buffer index.
2. Removed extra memcopy for grab image.
3. Removed device closing from autosetup_capture_mode_v4l2

* cap_v4l:
1. The `goto` was eliminated
2. Fixed use of temporary buffer index for V4L2_PIX_FMT_SN9C10X
3. Fixed use of the bufferIndex
4. Removed trailing spaces and unused variables.

* cap_v4l:
1. Alias for capture->buffers[capture->bufferIndex]
2. Reduced size of data for memcpy: bytesused instead of length
3. Refactoring. Code duplication. More info for debug

* cap_v4l:
1. Added the ability to grab and retrieveFrame independently several times

* cap_v4l:
1. Not need to close/open device for new capture parameters applying.
2. Removed using of device name as a flag that the capture is closed. Added sufficient function.
3. Refactoring. Added requestBuffers and createBuffers

* cap_v4l:
1. Added tryIoctl with `select` like was in mainloop_v4l2.
2. Fixed buffer request for device without closing the device.
3. Some static function moved to CvCaptureCAM_V4L
4. Removed unused defines

* cap_v4l:
1. Thread-safe now

* cap_v4l:
1. Fixed thread-safe destructor
2. Fixed FPS setting

* Missed brake

* Removed thread-safety

* cap_v4l:
1. Reverted conversion parameters to/from [0,1] by default for backward compatibility.
2. Added setting for turn off compatibility mode: set CV_CAP_PROP_MODE to 65536
3. Most static functions moved to CvCaptureCAM_V4L
4. Refactoring of icvRetrieveFrameCAM_V4L and using of frame_allocated flag

* cap_v4l:
1. Added conversion to RGB from NV12, NV21
2. Refactoring. Removed wrappers for known format conversions.

* Added `CAP_PROP_CHANNEL` to the enum VideoCaptureProperties.
CAP_V4L migrated to use VideoCaptureProperties.

* 1. Update comments.
2. Environment variable `OPENCV_VIDEOIO_V4L_RANGE_NORMALIZED` for setting default backward compatibility mode.
3. Revert getting of `CAP_PROP_MODE` as fourcc code in backward compatibility mode.

* videoio: update cap_v4l - compatibilityMode => normalizePropRange

* videoio(test): V4L2 MJPEG test

`v4l2-ctl --list-formats` should have 'MJPG' entry

* videoio: fix buffer initialization

to avoid "munmap: Invalid argument" messages
2018-11-08 21:27:45 +03:00
Alexander Alekhin
5059523937 core: fix processing of vector-rows 2018-11-08 20:04:22 +03:00
Alexander Alekhin
0c261acf3a Merge pull request #13065 from dkurt:dnn_update_tf_faster_rcnn 2018-11-08 16:31:39 +00:00
Alexander Alekhin
92a58a0eae Merge pull request #12454 from jveitchmichaelis:y16_dshow_windows 2018-11-08 14:05:23 +00:00
Alexander Alekhin
bb7cfcbcdb Merge pull request #12064 from seiko2plus:coreUnvintrinArithm2 2018-11-08 14:02:40 +00:00
unknown
13ede34516 Add support for changing fourcc and support mono formats (e.g. Y8, Y16) 2018-11-07 21:03:36 +00:00
Vitaly Tuzov
e5d7f446d6 Merge pull request #13056 from terfendail:box_wintr
* Updated boxFilter implementations to use wide universal intrinsics

* boxFilter implementation moved to separate file

* Replaced ROUNDUP macro with roundUp() function
2018-11-07 23:59:36 +03:00
Alexander Alekhin
c72b6b3be8 Merge pull request #13043 from alalek:compatibility_12623 2018-11-07 20:54:40 +00:00
Dmitry Kurtaev
dc9e6d3af8 Update a script to generate text graphs for Faster-RCNN networks from TensorFlow 2018-11-07 18:33:01 +03:00
catree
eebf0dd7c9 Fix integer overflow when accumulating timing values. 2018-11-07 13:04:48 +01:00
Alexander Alekhin
18c44b2ce8 Merge pull request #13036 from berak:java_MatOfRotatedRect_utils 2018-11-06 20:28:45 +00:00
Alexander Alekhin
4531f9f2f4 Merge pull request #13023 from terfendail:medianBlur_sep 2018-11-06 20:22:08 +00:00
Alexander Alekhin
fa91e4ff27 Merge pull request #12999 from fegorsch:improve-circle-detector 2018-11-06 18:40:55 +00:00
Alexander Alekhin
d4e3405db2
Merge pull request #13045 from LaurentBerger:kmeansdoc
typo in kmeans doc
2018-11-06 20:00:47 +03:00
Alexander Alekhin
857b64efef
Merge pull request #13040 from alalek:docs_cleanup_3.4 2018-11-06 19:51:47 +03:00
Alexander Alekhin
572af7640f Merge pull request #13053 from berak:highgui_win32_waitkey 2018-11-06 16:18:11 +00:00
lqy123000
cceeca3052 Merge pull request #12916 from lqy123000:bugfix_templmatch
* avoid rounding errors

* imgproc: replace condition in matchTemplate
2018-11-06 19:13:48 +03:00
berak
eaee63d96b java: add converters, tests for MatOfRotatedRect 2018-11-06 16:40:56 +01:00
berak
cae2a53563 highgui: fix broken waitKey() condition in window_w32 2018-11-06 11:43:58 +01:00
LaurentBerger
5132102863 typo in kmeans doc 2018-11-04 21:30:31 +01:00
Alexander Alekhin
4395c1b9f8 videoio: backport "VideoCapture(int index, int apiPreference)" interface 2018-11-04 17:27:47 +00:00
Alexander Alekhin
79dc0ed175 docs: intro formatting update, minor cleanup 2018-11-04 02:36:24 +00:00
Alexander Alekhin
c6d2f0399a videoio: fix build of standalone ffmpeg plugin 2018-11-03 02:17:47 +00:00
fegorsch
ce00d38bd9 Add test for symmetric circles with clustering 2018-11-02 15:13:46 +01:00
Vitaly Tuzov
877de883b0 medianBlur() implementation moved to separate file 2018-11-02 16:28:23 +03:00
Vadim Pisarevsky
d9b8a9d90e Merge pull request #13013 from berak:java_MatOfRotatedRect 2018-11-02 12:36:06 +00:00
fegorsch
30bf4a5e34 CircleGridClusterFinder: map circle pattern width and height correctly
During the cluster-based detection of circle grids, the detected circle
pattern has to be mapped to 3D-points. When doing this the width (i.e.
more circles) and height (i.e. less circles) of the pattern need to
be identified in image coordinates.

Until now this was done by assuming that the shorter side in image
coordinates (length in pixels) corresponds to the height in 3D.
This assumption does not hold if we look at the pattern from
a perspective where the projection of the width is shorter
than the projection of the height. This in turn lead to misdetections in
although the circle pattern was clearly visible.

Instead count how many circles have been detected along two edges of the
projected quadrangle and use the one with more circles as width and the
one with less as height.
2018-11-02 12:03:20 +01:00
Vitaly Tuzov
0fda551dbc Updated medianBlur implementations to use wide universal intrinsics 2018-11-02 12:26:23 +03:00
Alexander Alekhin
a724525c00 Merge pull request #10584 from eruffaldi:F10583_videoio_ffmpeg_lossless 2018-11-01 16:57:11 +00:00
berak
0cd14e3fb4 java: add support for MatOfRotatedRect 2018-11-01 15:37:23 +01:00
Alexander Alekhin
a1816e8c77 Merge pull request #13002 from dkurt:onnx_padding 2018-11-01 11:40:22 +00:00
Ilari Venäläinen
e6c41f0de6 Merge pull request #12989 from venalil:fix_thresholded_tiff_read
* Fix reading of black-and-white (thresholded) TIFF images

I recently updated my local OpenCV version to 3.4.3 and found out that
I could not read my TIFF images related to my project. After debugging I
found out that there has been some static analysis fixes made
that accidentally have broken reading those black-and-white TIFF images.

Commit hash in which reading of mentioned TIFF images has been broken:
cbb1e867e5

Basically the fix is to revert back to the same functionality that has been there before,
when black-and-white images are read bpp (bitspersample) is 1.
Without the case 1: this TiffDecoder::readHeader() function always return false.

* Added type and default error message

* Added stdexcept include

* Use CV_Error instead of throw std::runtime_error

* imgcodecs(test): add TIFF B/W decoding tests
2018-11-01 14:34:34 +03:00
Emanuele Ruffaldi
b4398d62b2 ffmpeg for lossy 2018-11-01 00:06:29 +00:00
Dmitry Kurtaev
a6f9170f10 Add ONNX's padding import 2018-10-31 18:24:05 +03:00
Suleyman TURKMEN
4d0ed5c13c Merge pull request #12971 from sturkmen72:upd_imgproc_hpp
* Update imgproc.hpp

* update color conversion codes
2018-10-31 18:08:24 +03:00
Vadim Pisarevsky
b669e9f648 Merge pull request #12994 from vpisarev:fix_imshow_mac 2018-10-31 11:13:28 +00:00
Vadim Pisarevsky
ebdc870296 fixed imshow on mac; before that just the window titlebar was shown, without the window content. 2018-10-31 10:40:58 +03:00
Alexander Alekhin
850053f9ca Merge pull request #12982 from eldruin:python-gen-close-file 2018-10-30 18:41:23 +00:00
Rostislav Vasilikhin
fa91d621fa Merge pull request #12876 from savuor:color_rgb2rgb_wide
* RGB2RGB initially rewritten

* NEON impl removed

* templated version added for ushort, float

* data copying allowed for RGB2RGB

* inplace processing fixed

* fields to local vars

* no zeroupper until it's fixed

* vx_cleanup() added back
2018-10-30 18:36:23 +03:00
Alexander Alekhin
2268ed1b6e Merge pull request #12948 from catree:add_drawFrameAxes 2018-10-30 13:33:01 +00:00
Sayed Adel
93ffebc273 core: reimplement SIMD arithmetic, logic and comparison operations into wide universal intrinsics
- initialize arithmetic dispatcher
  - add new universal intrinsic v_absdiffs
  - add new universal intrinsic v_pack_b
  - add accumulate version of universal intrinsic v_round
  - fix sse/avx2:uint8 multiplication overflow
  - reimplement arithmetic, logic and comparison operations into wide universal intrinsics
    with full support for all types
  - reimplement IPP arithmetic, logic and comparison operations in a sperate file arithm_ipp.hpp
  - avoid scalar multiplication if scaling factor eq 1 and use integer multiplication
  - move C arithmetic operations to precomp.hpp and delete [arithm_simd|arithm_core].hpp
  - add compatibility with new opencv4 divide policy
2018-10-30 12:48:31 +02:00
Alexander Alekhin
76b6f6b017 Merge pull request #12938 from dkurt:java_ndim_mat 2018-10-29 17:06:44 +00:00
Diego Barrios Romero
7a884ab6a5 Fix closing input file 2018-10-29 13:05:46 +01:00
Vadim Pisarevsky
792079ad33 Merge pull request #12964 from savuor:fix/zeroupper_all 2018-10-29 11:35:57 +00:00
Vadim Pisarevsky
a9d77b5c64 Merge pull request #12966 from catree:fix_distortion_image 2018-10-29 11:27:49 +00:00
Alexander Nesterov
aba66352dd Fix dataset: russian.jpg 2018-10-29 10:30:49 -01:00
Alexander Alekhin
6c444ced08 Merge pull request #12954 from seanm:MinorMac 2018-10-28 14:52:32 +00:00
Alexander Alekhin
012f36e47d Merge pull request #12958 from kamino410:doc_dist_param 2018-10-27 16:28:57 +00:00