本文整理了Java中org.opencv.imgproc.Imgproc.blur()
方法的一些代码示例,展示了Imgproc.blur()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Imgproc.blur()
方法的具体详情如下:
包路径:org.opencv.imgproc.Imgproc
类名称:Imgproc
方法名:blur
[英]Blurs an image using the normalized box filter.
The function smoothes an image using the kernel:
K = 1/(ksize.widthksize.height) 1 1 1 *s 1 1 1 1 1 *s 1 1.................. 1 1 1 s 1 1
The call blur(src, dst, ksize, anchor, borderType)
is equivalent to boxFilter(src, dst, src.type(), anchor, true, borderType)
.
[中]使用规格化长方体过滤器模糊图像。
该函数使用内核平滑图像:
K=1/(K尺寸宽度K尺寸高度)1s1s1。。。。。。。。。。。。。。。。。。11s11
调用blur(src, dst, ksize, anchor, borderType)
相当于boxFilter(src, dst, src.type(), anchor, true, borderType)
。
代码示例来源:origin: RaiMan/SikuliX2
public static Mat detectEdges(Mat mSource) {
Mat mSourceGray = Element.getNewMat();
Mat mDetectedEdges = Element.getNewMat();
int edgeThresh = 1;
int lowThreshold = 100;
int ratio = 3;
int kernelSize = 5;
int blurFilterSize = 3;
if (mSource.channels() == 1) {
mSourceGray = mSource;
} else {
Imgproc.cvtColor(mSource, mSourceGray, toGray);
}
Imgproc.blur(mSourceGray, mDetectedEdges, new Size(blurFilterSize, blurFilterSize));
Imgproc.Canny(mDetectedEdges, mDetectedEdges,
lowThreshold, lowThreshold * ratio, kernelSize, false);
return mDetectedEdges;
}
//</editor-fold>
代码示例来源:origin: nroduit/Weasis
private void processTileImpl(Mat tileInput, Mat tileOutput) {
Imgproc.blur(tileInput, tileOutput, new Size(7.0, 7.0));
}
代码示例来源:origin: hschott/Camdroid
protected void execute() {
out = this.rgb();
Imgproc.blur(out, this.mask, new Size(sigma_x, sigma_x));
Core.addWeighted(out, (double) alpha / 10, this.mask,
((double) beta - 10) / 10, 0, out);
}
代码示例来源:origin: hschott/Camdroid
protected void execute() {
out = gray();
Imgproc.blur(out, out, new Size(3, 3));
Imgproc.Canny(out, out, min, max);
}
代码示例来源:origin: JavaOpenCVBook/code
public Mat blur(Mat input, int numberOfTimes){
Mat sourceImage = new Mat();
Mat destImage = input.clone();
for(int i=0;i<numberOfTimes;i++){
sourceImage = destImage.clone();
Imgproc.blur(sourceImage, destImage, new Size(3.0, 3.0));
}
return destImage;
}
代码示例来源:origin: JavaOpenCVBook/code
public Mat blur(Mat input, int numberOfTimes){
Mat sourceImage = new Mat();
Mat destImage = input.clone();
for(int i=0;i<numberOfTimes;i++){
sourceImage = destImage.clone();
Imgproc.blur(sourceImage, destImage, new Size(3.0, 3.0));
}
return destImage;
}
代码示例来源:origin: JavaOpenCVBook/code
public Mat blur(Mat input, int numberOfTimes){
Mat sourceImage = new Mat();
Mat destImage = input.clone();
for(int i=0;i<numberOfTimes;i++){
sourceImage = destImage.clone();
Imgproc.blur(sourceImage, destImage, new Size(3.0, 3.0));
}
return destImage;
}
代码示例来源:origin: JavaOpenCVBook/code
public Mat blur(Mat input, int numberOfTimes){
Mat sourceImage = new Mat();
Mat destImage = input.clone();
for(int i=0;i<numberOfTimes;i++){
sourceImage = destImage.clone();
Imgproc.blur(sourceImage, destImage, new Size(3.0, 3.0));
}
return destImage;
}
代码示例来源:origin: JavaOpenCVBook/code
public Mat blur(Mat input, int numberOfTimes){
Mat sourceImage = new Mat();
Mat destImage = input.clone();
for(int i=0;i<numberOfTimes;i++){
sourceImage = destImage.clone();
Imgproc.blur(sourceImage, destImage, new Size(3.0, 3.0));
}
return destImage;
}
代码示例来源:origin: JavaOpenCVBook/code
public Mat blur(Mat input, int numberOfTimes){
Mat sourceImage = new Mat();
Mat destImage = input.clone();
for(int i=0;i<numberOfTimes;i++){
sourceImage = destImage.clone();
Imgproc.blur(sourceImage, destImage, new Size(3.0, 3.0));
}
return destImage;
}
代码示例来源:origin: JavaOpenCVBook/code
public Mat blur(Mat input, int numberOfTimes){
Mat sourceImage = new Mat();
Mat destImage = input.clone();
for(int i=0;i<numberOfTimes;i++){
sourceImage = destImage.clone();
Imgproc.blur(sourceImage, destImage, new Size(3.0, 3.0));
}
return destImage;
}
代码示例来源:origin: JavaOpenCVBook/code
public Mat blur(Mat input, int numberOfTimes){
Mat sourceImage = new Mat();
Mat destImage = input.clone();
for(int i=0;i<numberOfTimes;i++){
sourceImage = destImage.clone();
Imgproc.blur(sourceImage, destImage, new Size(3.0, 3.0));
}
return destImage;
}
代码示例来源:origin: JavaOpenCVBook/code
public Mat blur(Mat input, int numberOfTimes){
Mat sourceImage = new Mat();
Mat destImage = input.clone();
for(int i=0;i<numberOfTimes;i++){
sourceImage = destImage.clone();
Imgproc.blur(sourceImage, destImage, new Size(3.0, 3.0));
}
return destImage;
}
代码示例来源:origin: JavaOpenCVBook/code
public Mat blur(Mat input, int numberOfTimes){
Mat sourceImage = new Mat();
Mat destImage = input.clone();
for(int i=0;i<numberOfTimes;i++){
sourceImage = destImage.clone();
Imgproc.blur(sourceImage, destImage, new Size(3.0, 3.0));
}
return destImage;
}
代码示例来源:origin: JavaOpenCVBook/code
public Mat blur(Mat input, int numberOfTimes){
Mat sourceImage = new Mat();
Mat destImage = input.clone();
for(int i=0;i<numberOfTimes;i++){
sourceImage = destImage.clone();
Imgproc.blur(sourceImage, destImage, new Size(3.0, 3.0));
}
return destImage;
}
代码示例来源:origin: JavaOpenCVBook/code
public Mat blur(Mat input, int numberOfTimes){
Mat sourceImage = new Mat();
Mat destImage = input.clone();
for(int i=0;i<numberOfTimes;i++){
sourceImage = destImage.clone();
Imgproc.blur(sourceImage, destImage, new Size(3.0, 3.0));
}
return destImage;
}
代码示例来源:origin: JavaOpenCVBook/code
public Mat blur(Mat input, int numberOfTimes){
Mat sourceImage = new Mat();
Mat destImage = input.clone();
for(int i=0;i<numberOfTimes;i++){
sourceImage = destImage.clone();
Imgproc.blur(sourceImage, destImage, new Size(3.0, 3.0));
}
return destImage;
}
代码示例来源:origin: JavaOpenCVBook/code
public Mat blur(Mat input, int numberOfTimes){
Mat sourceImage = new Mat();
Mat destImage = input.clone();
for(int i=0;i<numberOfTimes;i++){
sourceImage = destImage.clone();
Imgproc.blur(sourceImage, destImage, new Size(3.0, 3.0));
}
return destImage;
}
代码示例来源:origin: JavaOpenCVBook/code
private void processOperation() {
if(noneString.equals(filterMode)){
output = image.clone();
}
else {
output = new Mat(image.rows(), image.cols(), image.type());
Size size = new Size(3.0, 3.0);
if(blurString.equals(filterMode)){
Imgproc.blur(image, output, size);
}
else if(gaussianString.equals(filterMode)){
Imgproc.GaussianBlur(image, output, size, 0);
}
else if(medianString.equals(filterMode)){
Imgproc.medianBlur(image, output, 3);
}
else if(bilateralString.equals(filterMode)){
Imgproc.bilateralFilter(image, output, 9, 100, 100);
}
}
}
代码示例来源:origin: JavaOpenCVBook/code
Imgproc.blur(canny, canny, new Size(3,3));
内容来源于网络,如有侵权,请联系作者删除!