-
Notifications
You must be signed in to change notification settings - Fork 39
Кумбрасьев Павел #93
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Кумбрасьев Павел #93
Conversation
The second laboratory
|
||
|
||
|
||
Rect_<int> roi; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@TheG1uy, глобальных переменных не должно быть в реализации. Необходимые объекты следует передавать через параметры void* userdata
.
"{ median | | apply median filter for ROI }" | ||
"{ edges | | detect edges in ROI }" | ||
"{ pix | | pixelize ROI }" | ||
"{ h ? help usage | | print help message }"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@TheG1uy, надо почистить форматирование, чтобы отступы были везде одинаковые, чтобы не было лишних пустых строк и закомментированного кода.
#include "opencv2/highgui.hpp" | ||
|
||
#include "ImageProcessorImpl.hpp" | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@TheG1uy, ваше решение должно быть в отдельном файле, которое является копией devtools_demo.cpp
.
|
||
cv::Mat src_tmp = src.clone(); | ||
cv::Mat src_tmp_roi = src_tmp(roi); | ||
cv::Mat dst_roi_green = src_tmp_roi.clone(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@TheG1uy, чтобы не писать везде cv::
можно подключить после подключения библиотек using namespace cv;
|
||
cv::cvtColor(src_tmp_roi, src_roi_green, cv::COLOR_BGR2GRAY); | ||
cv::blur(src_roi_green, gray_blurred, cv::Size(kernel_size, kernel_size)); | ||
cv::Canny(gray_blurred, detected_edges, 0, 50); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@TheG1uy, здесь надо использовать параметры const int low_threshold, const int ratio
, а не фиксированные константы.
Вторая лаба. Вроде +- в фильтрах разобрался. Приступаю к 3 лабе.