Reference Source:
Learning OpenCV: Filter Series (5)-Radial blur: Zoom & Rotate
Define head function#ifndef ps_algorithm_h_included#define ps_algorithm_h_included#include <iostream># Include <string> #include "cv.h" #include "highgui.h" #include "cxmat.hpp" #include "cxcore.hpp" #include "math.h" Using namespace Std;using namespace Cv;void show_image (mat&, const string &); #endif//ps_algorithm_h_included/* This program would generateradition Blur effect*/#include "ps_algorithm.h" #include <time.h>using namespace std; Using namespace Cv;int Main () {string Img_name ("4.jpg"); Mat img_in; Img_in=imread (Img_name); Show_image (img_in, img_name); Mat img_out (Img_in.size (), CV_32FC3); Img_in.convertto (Img_out, CV_32FC3); int width=img_in.cols; int height=img_in.rows; float R; float angle; Point Center (WIDTH/2, HEIGHT/2); float T1, T2, T3; int new_x, new_y; int num=20; for (int y=0, y
Original
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
opencv--radial Blur