Conversation
|
@dbudniko please take a look |
# Conflicts: # modules/gapi/test/common/gapi_core_tests.hpp # modules/gapi/test/common/gapi_imgproc_tests.hpp # modules/gapi/test/common/gapi_imgproc_tests_inl.hpp
|
Looks good |
alalek
left a comment
There was a problem hiding this comment.
Instead of playing with size, you can split planes completely:
planeB, planeG, planeR
|
|
||
| @note Function textual ID is "org.opencv.core.transform.resizeP" | ||
|
|
||
| @param src input image, must be of @ref CV_8UC3 type; |
There was a problem hiding this comment.
planar image
CV_8UC3
CV_8UC3 means interleaved image. So planar is source of confusion here.
planar is src1, src2 and src3 with CV_8UC1 type.
What is the main difference between resize and resizeP? Missing fx, fy?
Do we really need this entry point?
How do you want to downscale image by 2 with odd source size?
9x9 => 4.5 x 4.5 as 4x4 - is not 2x downscaling without extra information.
There was a problem hiding this comment.
The main difference is that resizeP has GMatP ("planar GMat") as input and as output so the engine can behave correctly.
This description definitely should be changed to reflect planar image memory layout (three planes laying in the memory contiguously), so the image height should be plane_height*plane_number, image type is CV_8UC1 and so on. Maybe planar images deserve some special chapter?
| The function converts an input image from NV12 color space to RGB. | ||
| The conventional ranges for Y, U, and V channel values are 0 to 255. | ||
|
|
||
| Output image must be 8-bit unsigned planar 3-channel image @ref CV_8UC3. |
There was a problem hiding this comment.
planar 3-channel
CV_8UC3 is interleaved 3-channel.
There was a problem hiding this comment.
I've upadted doxygen comments. I suggest to merge it as is to move forward.
For sure, and this is how our preprocessing works now on CPU. We do use a "split3" thing with its output
On some platform which we currently enable with G-API, the operations like color conversions and resize operate with planar images natively. However, that operations assume only a single data pointer (with a fixed offset between the planes), not three different ones. So from the API perspective it is safer to introduce "planar" image type there rather than simulate it with three data objects pointing to the same memory chunk |
|
3-channel color image:
Not sure why you need some strange Main problem of 3D approach is NV12 storage format, where planes are not "equal". |
It is mainly an API contract. All our existing kernels which work with |
This is a good point, BTW! Probably later we'll adjust API to use multi-dimensional matrices for the planar case. |
|
Thanks! |
* master: (74 commits) Merge pull request opencv#14917 from rgarnov:gapi_planar_kernels Fixed initUndistortRectifyMap AVX2 implementation Merge pull request opencv#14959 from dvd42:onnx_clip videoio: eliminate build warnings (clang) ts: runtime check for misused 'optional' test data files 3rdparty(itt): support AARCH64 tensroflow support maxpoolgrad Fix blob detector insertion sort Fix crash, add assert and test Merge pull request opencv#14946 from andrey-golubev:obj_not_ref re-enable CPU_BASELINE=FP16 on Armv7 platform Merge pull request opencv#14828 from armenpoghosov:parmen_RANSACPointSetRegistrator_getSubset_disaster_cleanup Merge pull request opencv#14916 from terfendail:wsignmask_deprecated core: evaluate CV_Error() parameters during static scans dnn: fix build with Vulkan Merge pull request opencv#14936 from StefanBruens:crosscorr_cleanup Explicitly default operator= for Vec<T, n> Fix JS sample of dnn 3rdparty: TBB version 2018u1 => 2019u8 cmake: support rpath-link linker option ...
G-API planar kernels (opencv#14917) * Added resizeP with tests * NV12 planar filters * fix warnings in ResizeP test * fix out mat ocv warning * sz_on - > sz rename * cpu tests new signature * try to fix resizeP test * trailing spaces remove * doxygen doc fixed * doxygen minor fix * more doxygen fixes * Doxygen corrected and extended after review.
Uh oh!
There was an error while loading. Please reload this page.