Posts

Showing posts from January, 2017

Code for simple edge detection using C

Image
remember to give file name with .bmp extension it will only work with 8 bit images Code for simple edge  detection using C #include<stdlib.h> #include<stdio.h> #include<math.h> void main() {      FILE *imag1, *imag2;     int i=0,byte,q;    char namein[30];     char nameout[30];     printf("enter name of input image with extension \n");     gets(namein);     printf("enter name of output image with extension \n");     gets(nameout);   //..................clone image..................    imag1=fopen(namein,"rb+");    if(imag1==NULL)     printf("cannot open file");    imag2=fopen(nameout,"wb");    while(!feof(imag1))    {        fputc(fgetc(imag1),imag2);    } //...............................end clone image...................     int pic[400][600...