当前位置: 首页>>代码示例>>C++>>正文


C++ ImageProcessor::processImage方法代码示例

本文整理汇总了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");
}
开发者ID:J-Fid,项目名称:Senior-Design-I,代码行数:22,代码来源:imageProcUnitTests.cpp

示例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() );
}
开发者ID:dbarker,项目名称:LPT,代码行数:23,代码来源:imageproc.cpp

示例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);
}
开发者ID:daflad,项目名称:CompVis,代码行数:8,代码来源:main.cpp

示例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);
}
开发者ID:daflad,项目名称:CompVis,代码行数:7,代码来源:main.cpp

示例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);
}
开发者ID:daflad,项目名称:CompVis,代码行数:8,代码来源:main.cpp

示例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);
}
开发者ID:daflad,项目名称:CompVis,代码行数:7,代码来源:main.cpp

示例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);
}
开发者ID:daflad,项目名称:CompVis,代码行数:7,代码来源:main.cpp

示例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);
}
开发者ID:daflad,项目名称:CompVis,代码行数:6,代码来源:main.cpp


注:本文中的ImageProcessor::processImage方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。