本文整理汇总了C++中ImageProcessor::processImage方法的典型用法代码示例。如果您正苦于以下问题:C++ ImageProcessor::processImage方法的具体用法?C++ ImageProcessor::processImage怎么用?C++ ImageProcessor::processImage使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ImageProcessor
的用法示例。
在下文中一共展示了ImageProcessor::processImage方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: testProcessImage
/*
* tests the processImage() function
*/
void testProcessImage(){
cv::Mat img = cv::imread("images/horizontal-lines.jpg", CV_LOAD_IMAGE_COLOR);
assert(!img.empty());
imageProcessor.processImage(img);
cv::imshow("processing horizontal-lines.jpg", img);
img = cv::imread("images/two2.png", CV_LOAD_IMAGE_COLOR);
assert(!img.empty());
imageProcessor.processImage(img);
cv::imshow("processing two2.png", img);
cv::waitKey(0);
printf("processImage() test passed.\n");
}
示例2: processImages
void processImages( Camera& camera, ImageProcessor& processor, Detector& detector )
{
cout << "Camera "<< camera.id << ": --Processing Images" << endl;
stringstream result_window;
result_window << camera.name << ": detected particles";
processor.addControls();
detector.addControls();
cv::waitKey(10);
size_t number_of_frames = camera.imagelist.size();
camera.frames.resize( number_of_frames );
for (int i = 0; i < number_of_frames; ++i) {
cv::Mat temp_image = camera.frames[i].image.clone();
processor.processImage( temp_image );
cv::imshow("processed image", temp_image );
detector.detectFeatures( temp_image, camera.frames[i].particles);
detector.drawResult( camera.frames[i] );
cv::imshow(result_window.str(), camera.frames[i].image);
}
cv::destroyWindow( result_window.str() );
}
示例3: rotationCallback
// Rotation varies from -30 to 30
// Max slider value is 60
// Smaller range to ensure 0 can be found again.
void rotationCallback(int val, void *ipPtr){
ImageProcessor *ip = static_cast<ImageProcessor *>(ipPtr);
ip->rotation = (val - 3000) / -100;
ip->processImage(&ip->hsv, true);
}
示例4: sharpnessCallback
// Sharpness varies from -1 to 2
// max slider value is 300
void sharpnessCallback(int val, void *ipPtr){
ImageProcessor *ip = static_cast<ImageProcessor *>(ipPtr);
ip->sharpness = ((float)val / 100) - 1;
ip->processImage(&ip->hsv, true);
}
示例5: contrastCallback
// Contrast varies from 0.5 to 2
// Max slider value is 200
void contrastCallback(int val, void *ipPtr){
ImageProcessor *ip = static_cast<ImageProcessor *>(ipPtr);
ip->contrast = ((float)val / 100) + 0.5;
ip->contrast = ip->contrast;
ip->processImage(&ip->hsv, true);
}
示例6: brightnessCallback
// Brightness varies from -100 to 100
// Max slider value is 200
void brightnessCallback(int val, void *ipPtr){
ImageProcessor *ip = static_cast<ImageProcessor *>(ipPtr);
ip->brightness = val - 100;
ip->processImage(&ip->hsv, true);
}
示例7: colourfullnessCallback
// adjustColourfullness is on it's own branch for imagae processing
// send value to adjustColourfullness before calling processImage
void colourfullnessCallback(int val, void *ipPtr){
ImageProcessor *ip = static_cast<ImageProcessor *>(ipPtr);
ip->adjustColourfullness(&val);
ip->processImage(&ip->hsv, false);
}
示例8: histEqCallback
// If the slider is equal to 1 the histEq perfomed.
void histEqCallback(int pos, void *ipPtr){
ImageProcessor *ip = static_cast<ImageProcessor *>(ipPtr);
ip->eq = pos == 1;
ip->processImage(&ip->hsv, true);
}