GAPI: Move Resize kernel from core to imgproc#21157
Conversation
25ca3e4 to
2fd2b0b
Compare
| if (sz.width != 0 && sz.height != 0) | ||
| { |
There was a problem hiding this comment.
| if (sz.width != 0 && sz.height != 0) | |
| { | |
| if (sz.width != 0 && sz.height != 0) { |
There was a problem hiding this comment.
Existed coding style is fine.
There is no Java.
Please use "Google" or "WebKit" style from clang-format
There was a problem hiding this comment.
I thought it would be good to align the code style in the file.
There are both variants ) { and ) enter { in file.
There was a problem hiding this comment.
I will follow the ) enter { style through the files. Thanks @mpashchenkov
| } | ||
| else | ||
| { |
There was a problem hiding this comment.
| } | |
| else | |
| { | |
| } else { |
| { | ||
|
|
||
| INSTANTIATE_TEST_CASE_P(ResizeTestCPU, ResizeTest, | ||
| Combine(Values( CV_8UC1, CV_8UC3, CV_16UC1, CV_16SC1, CV_32FC1 ), |
There was a problem hiding this comment.
| Combine(Values( CV_8UC1, CV_8UC3, CV_16UC1, CV_16SC1, CV_32FC1 ), | |
| Combine(Values(CV_8UC1, CV_8UC3, CV_16UC1, CV_16SC1, CV_32FC1 ), |
There was a problem hiding this comment.
I didn't notice the space at the end. It can be reverted to its previous condition or:
6SC1, CV_32FC1 ) --> 6SC1, CV_32FC1)
There was a problem hiding this comment.
Thanks, I removed both of them
| cv::Size(30,30)))); | ||
|
|
||
| INSTANTIATE_TEST_CASE_P(ResizePTestCPU, ResizePTest, | ||
| Combine(Values( CV_8UC1, CV_8UC3, CV_16UC1, CV_16SC1, CV_32FC1 ), |
There was a problem hiding this comment.
| Combine(Values( CV_8UC1, CV_8UC3, CV_16UC1, CV_16SC1, CV_32FC1 ), | |
| Combine(Values(CV_8UC1, CV_8UC3, CV_16UC1, CV_16SC1, CV_32FC1 ), |
| cv::Size(30,30)))); | ||
|
|
||
| INSTANTIATE_TEST_CASE_P(ResizeTestCPU, ResizeTestFxFy, | ||
| Combine(Values( CV_8UC1, CV_8UC3, CV_16UC1, CV_16SC1, CV_32FC1 ), |
There was a problem hiding this comment.
@mpashchenkov this and other "debug" code were added and left for some reason. Why it should be removed during resize move from core to imgproc?
There was a problem hiding this comment.
Because this code was commented. And I think that reason is removing extra test cases for reduce OCV tests duration.
Commented code is unused and doesn't make sense from my point of view.
| Values(-1), | ||
| Values(IMGPROC_FLUID), | ||
| Values(Tolerance_FloatRel_IntAbs(1e-5, 1).to_compare_obj()), | ||
| Values(/*cv::INTER_NEAREST,*/ cv::INTER_LINEAR/*, cv::INTER_AREA*/), |
| { | ||
|
|
||
| INSTANTIATE_TEST_CASE_P(ResizeTestGPU, ResizeTest, | ||
| Combine(Values( CV_8UC1, CV_8UC3, CV_16UC1, CV_16SC1, CV_32FC1 ), |
| cv::Size(30,30)))); | ||
|
|
||
| INSTANTIATE_TEST_CASE_P(ResizeTestGPU, ResizeTestFxFy, | ||
| Combine(Values( CV_8UC1, CV_8UC3, CV_16UC1, CV_16SC1, CV_32FC1 ), |
| #include <opencv2/gapi.hpp> | ||
| #include <opencv2/gapi/core.hpp> | ||
| #include <opencv2/gapi/cpu/core.hpp> | ||
| #include <opencv2/gapi/imgproc.hpp> |
There was a problem hiding this comment.
Does the sample work correctly?
auto stream = cc.compileStreaming(cv::compile_args(cv::gapi::core::cpu::kernels()));
There was a problem hiding this comment.
Is it necessary to keep
#include <opencv2/gapi/core.hpp>
#include <opencv2/gapi/cpu/core.hpp>
here?
c2a6890 to
e8da3be
Compare
131d0bd to
e879858
Compare
Need to rebase commits (relates #21339) |
e879858 to
5b37f17
Compare
| #include <utility> // std::tuple | ||
|
|
||
| #include <opencv2/imgproc.hpp> | ||
| #include <opencv2/gapi/imgproc.hpp> |
There was a problem hiding this comment.
Do this headers make sense for core?
There was a problem hiding this comment.
Yes, <opencv2/gapi/imgproc.hpp> header is necessary for backward compatibility
| */ | ||
| namespace core { | ||
| using GResize = cv::gapi::imgproc::GResize; | ||
| using GResizeP = cv::gapi::imgproc::GResizeP; |
There was a problem hiding this comment.
Why are GResize and GResizeP located here (in core)?
There was a problem hiding this comment.
That aliases for backward compatibility too
GAPI: Move Resize kernel from core to imgproc * Move Resize kernel from core to imgproc * Applied style comments * Adding backward compatibility * Applied Asya PR
Pull Request Readiness Checklist
See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request
Patch to opencv_extra has the same branch name.