// 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&quo…
// 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&quo…
// 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&quo…
// 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&quo…
// 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&quo…
// 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&quo…
具体的算法原理可以参考: PS 滤镜, 浮雕效果 // 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" #inc…
算法原理可以参考: PS 滤镜,曝光过度 #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"…
%%%% Spherize clc; clear all; close all; addpath('E:\PhotoShop Algortihm\Image Processing\PS Algorithm'); I=imread('4.jpg'); Image=double(I); [row, col,layer]=size(Image); R=floor(min(row, col)/2); a=row/2; b=col/2; e=a/b; K=pi/2; alpha=1.0; % 控制变形程度…
%%%% 完成PS 中的染色玻璃滤镜特效 clc; clear all; close all; Image=imread('4.jpg'); Image=double(Image); Gray_Image=rgb2gray(Image/255); [row,col]=size(Gray_Image); S_filter=fspecial('sobel'); G=sqrt(imfilter(Gray_Image, S_filter, 'replicate').^2+...        imfil…
% method : 利用邻域的随意一点取代当前邻域全部像素点 %%%% mosaic clc; clear all; addpath('E:\PhotoShop Algortihm\Image Processing\PS Algorithm'); Image=imread('4.jpg'); Image=double(Image); size_info=size(Image);   height=size_info(1);   width=size_info(2);   N=11;   % 控…
这个算法原理很简单,对彩色图像的R,G,B 三个通道,分别求梯度,然后将梯度值作为三个通道的值. clc; clear all;Image=imread('4.jpg');Image=double(Image);R=Image(:,:,1);G=Image(:,:,2);B=Image(:,:,3);R_Gradient=Find_Gradient(R);G_Gradient=Find_Gradient(G);B_Gradient=Find_Gradient(B);Image_new(:,:,1…
这个算法的原理,就是将图像反相,然后分别比较原图与反相后的图三个通道的大小,将小的值输出. clc; clear all; Image=imread('4.jpg'); Image=double(Image); Image_inverse=255-Image; [row,col,layer]=size(Image); Image_new=Image; for i=1:row     for j=1:col         Image_new(i,j,1)=min(Image(i,j,1),Ima…
图像的表面模糊处理,其作用是在保留图像边缘的情况下,对图像的表面进行模糊处理.在对人物皮肤处理上,比高斯模糊更有效.因为高斯模糊在使人物皮肤光洁的同时,也将一些边缘特征如脸部的眉毛.嘴唇等给模糊了,不得不用蒙版小心的抹去这些地方的模糊部分. 在处理手法上,表面模糊也与其它卷积处理手段不同,如高斯模糊等在处理图像时都是采用统一的卷积矩阵进行,而表面模糊却是每一个像素点都有自己的卷积矩阵,而且还是3(4)套,用以对应于像素的R.G.B(A.R.G.B)分量.所以表面模糊在编程处理时,比其它卷积操作更…
// 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&quo…
程序完成 "毛玻璃" 特效, 不过边缘没有处理,使得最终的图像有黑边. 不过,有了黑边,感觉效果也不错,所以这个bug 没有管. #ifndef PS_ALGORITHM_H_INCLUDED #define PS_ALGORITHM_H_INCLUDED #include <iostream> #include <string> #include "cv.h" #include "highgui.h" #include…
%%% Fragment %%% 对原图做四个方向的平移,然后对平移的结果取平均 %%% 碎片效果 clc; clear all; Image=imread('4.jpg'); Image=double(Image)/255; [row,col,k]=size(Image); Image1=Image; Image2=Image; Image3=Image; Image4=Image; Offset=5; %%% 左移 Image1(:,1:col-Offset,:)=Image(:,1+Off…
这个特效简单来说,就是一个高通滤波器, 对图像做高斯滤波,用原图减去高斯滤波后的图,再将差值加上128. clc; clear all; close all; Image=imread('4.jpg'); Image=double(Image); Image1=Image; %% 设置高斯滤波器 Half_size=10; F_size=2*Half_size+1; G_Filter=fspecial('gaussian',F_size,F_size/6); %% 做高斯滤波 Image_Fil…
// 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&quo…
clc; clear all; Image=imread('4.jpg');Image=double(Image);p=3;  %% 控制浮雕的强度 %% 控制浮雕的方向 H=[0 0 p       0 0 0       -p 0 0];   Image_new=imfilter(Image,H,'conv')+128;     figure, imshow(Image_new/255); 原图 效果图…
%%%% Tile  %%%%% 实现拼贴效果 %%%%% 将原图像进行分块,然后让图像块在 %%%%% 新图像范围内进行随机移动,确定移动后的边界 %%%%% 将移动后的图像块填入新图像内 clc; clear all; close all; Image=imread('4.jpg'); Image1=double(Image); Image2=Image1; Image2(:,:,1)=0; Image2(:,:,2)=0; Image2(:,:,3)=0; %%%% 块数 (1-99) N…
// 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&quo…
// 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&quo…
// 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&quo…
本文用 Python 实现 PS 滤镜的波浪特效,具体效果可以参考之前的博客 http://blog.csdn.net/matrix_space/article/details/42215221 import numpy as np from skimage import img_as_float import matplotlib.pyplot as plt from skimage import io import numpy.matlib import math file_name2='D…
本文用Python 实现 PS 滤镜的旋涡特效,具体的算法原理和效果可以参考之前的博客: http://blog.csdn.net/matrix_space/article/details/42215191 import numpy as np from skimage import img_as_float import matplotlib.pyplot as plt from skimage import io import math import numpy.matlib file_na…
本文用 Python 实现 PS 滤镜中的 USM 锐化效果,具体的算法原理和效果可以参考之前的博客: http://blog.csdn.net/matrix_space/article/details/51169960 import matplotlib.pyplot as plt from skimage import io from skimage.filters import gaussian file_name='D:/Visual Effects/PS Algorithm/4.jpg…
本文用 Python 实现 PS 滤镜中的素描特效,具体的算法原理和效果可以参考之前的博客: http://blog.csdn.net/matrix_space/article/details/38687427 from skimage import img_as_float import matplotlib.pyplot as plt from skimage import io from skimage.filters._gaussian import gaussian file_name…
本文用 Python 实现 PS 滤镜中的表面模糊,具体的算法原理和效果可以参考之前的博客: http://blog.csdn.net/matrix_space/article/details/52818857 import matplotlib.pyplot as plt from skimage import io import numpy as np import numpy.matlib file_name='D:/Visual Effects/PS Algorithm/1.jpg';…
本文用 Python 实现 PS 滤镜中的旋转模糊,具体的算法原理和效果可以参考之前的博客: http://blog.csdn.net/matrix_space/article/details/39211667 from skimage import img_as_float import matplotlib.pyplot as plt from skimage import io import numpy as np import numpy.matlib file_name='D:/Vis…