Skip to content

Conversation

pavelkumbrasev
Copy link

Вторая лаба. Вроде +- в фильтрах разобрался. Приступаю к 3 лабе.




Rect_<int> roi;
Copy link
Contributor

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 }";
Copy link
Contributor

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"

Copy link
Contributor

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();
Copy link
Contributor

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);
Copy link
Contributor

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, а не фиксированные константы.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants