smooth

核心函数:cvSmooth

程序:

代码:

#include "cv.h"
#include "cxcore.h"
#include "highgui.h"
#include <iostream>
int smooth(int argc,char** argv)
{
IplImage* src=cvLoadImage("e:\\picture\\123.bmp",0);
cvNamedWindow("src");
cvShowImage("src",src);
IplImage* dst1=cvCreateImage(cvGetSize(src),src->depth,src->nChannels);
IplImage* dst2=cvCreateImage(cvGetSize(src),src->depth,src->nChannels);
IplImage* dst3=cvCreateImage(cvGetSize(src),src->depth,src->nChannels);
IplImage* dst4=cvCreateImage(cvGetSize(src),src->depth,src->nChannels);
IplImage* dst5=cvCreateImage(cvGetSize(src),src->depth,src->nChannels);
cvSmooth(src,dst1,CV_BLUR,3,3);  //简单模糊
cvSmooth(src,dst2,CV_BLUR_NO_SCALE,3,3);  //简单无缩放变换的模糊
cvSmooth(src,dst3,CV_MEDIAN,3,3); //中值模糊,可以避免孤立点的影响
cvSmooth(src,dst4,CV_GAUSSIAN,3,3);  //高斯模糊,可以在保留信号的条件下减少噪声,但是接近边缘无效
cvSmooth(src,dst5,CV_BILATERAL,3,3);  //双边滤波,不会将边缘平滑掉
cvNamedWindow("CV_BLUR");
cvNamedWindow("CV_BLUR_NO_SCALE");
cvNamedWindow("CV_MEDIAN");
cvNamedWindow("CV_GAUSSIAN");
cvNamedWindow("CV_BILATERAL");
cvShowImage("CV_BLUR",dst1);
cvShowImage("CV_BLUR_NO_SCALE",dst2);
cvShowImage("CV_MEDIAN",dst3);
cvShowImage("CV_GAUSSIAN",dst4);
cvShowImage("CV_BILATERAL",dst5);
cvWaitKey(0);
return 0;
}

smooth,布布扣,bubuko.com

时间: 2024-12-28 08:24:11

smooth的相关文章

Perfect smooth scrolling in UITableViews

https://medium.com/ios-os-x-development/perfect-smooth-scrolling-in-uitableviews-fd609d5275a5 Difficulty and the depth of material will increase from the beginning to the end of story, so I’ll start with things which are familiar to many of you. Deep

使用IIS 7.0 Smooth Streaming 优化视频服务

http://www.cnblogs.com/dudu/archive/2013/06/08/iis_webserver_settings.html (支持高并发的IIS Web服务器常用设置) http://zzstudy.offcn.com/archives/13148 (windows 2008 WEB服务器IIS7.5优化配置 支持10万个同时请求) http://blog.snsgou.com/post-510.html --------------------------------

OpenCV学习笔记——多种Smooth平滑处理

opencv库提供了好几种模糊平滑Smooth操作的类型作为cvSmooth的参数传入,从而达到不同的平滑效果,另外复习了一下如何复制一份图像和重新调整图像大小. 调整图像大小目前是按照一下步骤进行: 1.先cvcreate一个新的图像,cvcreate中的参数设为调整之后的大小(用Cvsize的构造函数封装代入) 2.然后再用cvresize把原图像输入到刚才构造的已设定好尺寸的图像中 代码: #include<cv.h> #include<highgui.h> //多种smoo

【OpenCV教程之九】平滑/模糊图片 Smooth / Blur Images及 彩色图转 灰度图和二值化

这一节,谈一谈如何对图像进行平滑,也可以叫做模糊.平滑图像的主要目的是减少噪声,这样采用平滑图像来降低噪声是是非常常见的预处理方法. 1.归一化滤波平滑-Homogeneous Smoothing 2.高斯滤波平滑-Gaussian Smoothing 3.中值滤波平滑-Median Smoothing 4.双边滤波平滑-Bilateral Smoothing 平滑是通过滑动窗口(内核或过滤器)扫描整个图像窗口,计算每个像素的基于核的值的和重叠的原始图像的像素的值的值来完成.这个过程在数学上称为

JQuery Study Notes— A small demo for Smooth Animated Menu

1. Before expanding: 2.  coding: <!DOCTYPE html> <html> <head> <title>Smooth Animated Menu</title> <script src="http://jqueryjs.googlecode.com/files/jquery-1.3.js" type="text/javascript"></script&

Smooth pursuit

If our eyes follow a bird across the sky, we make a slower movement called smooth pursuit. 如果我们的眼睛跟着一只鸟儿飞过天空,我们会做一个叫做平稳追踪的慢动作. Smooth pursuit requires something to follow, while saccades(扫视,另一个event,这里先不讨论) can be made on a white wall or even in the

smooth L1损失函数

相比于L2损失函数,smooth对离群点.异常值(outlier)不敏感,可控制梯度的量级使训练时不容易跑飞. 原文地址:https://www.cnblogs.com/pacino12134/p/11407897.html

scrollIntoView behavior smooth not work

关于 scrollIntoView 方法在 chrome version 78.0.3904.70(正式版本) (64 位)中不能正常工作的问题 当我同时使用  el.scrollIntoView({ block: 'center', behavior: 'smooth' })   和 document.querySelector('.someScrollElement').scrollTop = aNumber 的时候,scrollIntoView方法失效.对scrollTop的取值操作无影响

smooth l1 loss &amp; l1 loss &amp; l2 loss

引自:https://www.zhihu.com/question/58200555/answer/621174180 为了从两个方面限制梯度: 当预测框与 ground truth 差别过大时,梯度值不至于过大: 当预测框与 ground truth 差别很小时,梯度值足够小. 考察如下几种损失函数,其中 为预测框与 groud truth 之间 elementwise 的差异: 观察 (4),当 x 增大时 L2 损失对 x 的导数也增大.这就导致训练初期,预测值与 groud truth