The flutter shutter camera simulator
|
00001 /*borders.cpp*/ 00002 /* 00003 * Copyright 2012 IPOL Image Processing On Line http://www.ipol.im/ 00004 * 00005 * This program is free software: you can redistribute it and/or modify 00006 * it under the terms of the GNU General Public License as published by 00007 * the Free Software Foundation, either version 3 of the License, or 00008 * (at your option) any later version. 00009 * 00010 * This program is distributed in the hope that it will be useful, 00011 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00013 * GNU General Public License for more details. 00014 * 00015 * You should have received a copy of the GNU General Public License 00016 * along with this program. If not, see <http://www.gnu.org/licenses/>. 00017 */ 00018 00026 #include "borders.h" 00027 00028 00029 00030 00041 void borders(double *Image,double *modified, int w1, int h1) 00042 { 00043 00044 00045 00046 00050 00051 00052 for (int colonne=0;colonne<w1;colonne++) 00053 { 00054 for (int line=0;line<h1;line++) 00055 { 00056 modified[line*(2*w1)+colonne]=Image[line*w1+colonne]; 00057 00058 } 00059 } 00060 00061 00062 00066 00067 00068 for (int colonne=w1;colonne<2*w1;colonne++) 00069 { 00070 for (int line=0;line<h1;line++) 00071 { 00072 modified[line*(2*w1)+colonne]=Image[line*w1+(2*w1-colonne-1)]; 00073 } 00074 } 00075 00076 }