-
Notifications
You must be signed in to change notification settings - Fork 39
Improc #86
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?
Improc #86
Conversation
@SolarSystem23, мне надо запустить ваш код и на что-то посмотреть/помочь исправить? |
Посмотреть корректность кода |
cv::merge(channels, dst_roi); | ||
dst_roi.copyTo(src_copy_roi); | ||
return src_copy; | ||
} |
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.
Реализацию методов необходимо вынести из заголовочного файла в файл реализации.
|
||
std::fill(channels.begin(), channels.end(), dst_gray_roi); | ||
cv::Mat dst_roi; | ||
cv::merge(channels, dst_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.
Мне кажется, что можно было просто написать merge(dst_gray_roi, dst_gray_roi, dst_gray_roi, dst_roi)
, операция слияния перегружена.
samples/imgproc_demo.cpp
Outdated
|
||
const char* kAbout = | ||
"This is an empty application that can be treated as a template for your " | ||
"own doing-something-cool applications."; |
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.
Содержательная строка, описывающая функционал, осталась от шаблона.
samples/imgproc_demo.cpp
Outdated
#include <opencv/cv.hpp> | ||
#include <image_processing.hpp> | ||
|
||
#include "opencv2/core.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.
Общие правила по стилю кодирования предполагают, что сначала подключаются системные библиотеки, потом библиотеки третьих разработчиков, потом собственные библиотеки.
#include <iostream>
#include <string>
#include <opencv/cv.hpp>
#include <opencv2/core.hpp>
#include <image_processing.hpp>
Отличие угловых скобок и кавычек при подключении следующее: кавычки используются, если файл лежит в текущей директории, угловые скобки, когда заголовочные файлы лежат по подключаемым путям.
samples/imgproc_demo.cpp
Outdated
// Do something cool. | ||
cv::namedWindow("input"); | ||
cv::setMouseCallback("input", onMouse); | ||
cv::Mat input = cv::imread("/home/luba/Downloads/Lenna.jpg"); |
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.
Название файла должно быть передано через аргументы командной строки приложения.
break; | ||
} | ||
ImageProcessorImpl processor; | ||
|
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.
Что-то форматирование поплыло.
@SolarSystem23, у меня ваш код не собирается. Надо добиться того, чтобы код компилировался и выполнял базовые сценарии. |
|
||
CascadeDetector detector; | ||
//("../test/test_data/detection/cascades/intel_logo_cascade.xml"); | ||
detector.Init("/home/luba/github/itseez-ss-2016-practice/test/test_data/detection/cascades/unn_old_logo_cascade.xml"); |
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.
Надо передать модель через параметры командной строки.
detector.Init( filePathDetector); | ||
}*/ | ||
|
||
CvCapture* capture = cvCreateCameraCapture(CV_CAP_ANY); |
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.
Тип CvCapture
- это старый тип, сейчас есть VideoCapture
, у которого перегружены операции потокового ввода/вывода. Можно посмотреть пример использования в документации.
CvCapture* capture = cvCreateCameraCapture(CV_CAP_ANY); | ||
assert( capture ); | ||
IplImage* frame=0; | ||
cvNamedWindow("capture", CV_WINDOW_AUTOSIZE); |
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.
Аналогично это старая версия, новая версия namedWindow
|
||
CvCapture* capture = cvCreateCameraCapture(CV_CAP_ANY); | ||
assert( capture ); | ||
IplImage* frame=0; |
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.
Для представления изображения используется тип Mat
@@ -0,0 +1,96 @@ | |||
#include <iostream> |
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.
Почему этот файл оказался в ветке с лабораторной работой по обработке?!
@SolarSystem23, надо разбить версии по веткам (сейчас все лабы в одном месте). |
No description provided.