শুক্রবার, ৪ অক্টোবর, ২০১৩

C implementation of MATLAB function BWAREAOPEN

In my fourth year project , I have done a C implementaion of bwareaopen. The code worked well . It was written long ago so forgot how it was used. All I remember was that the image was given as a .h file value buffer. I guess if you need it then you can easily figure that out :).
===========================================
//bwareaopen.c

#define TH 95 //65
static int COUNT=0;
static int DELREG[TH][2]={{0},{0}};
static unsigned char Flag;
int X,Y;
/////////////////////////////block by dj////////////////////////////////////////////////////
int indexing(unsigned char *in_img,unsigned char *out_img,int m,int n)
{
if(Flag==0)
return(0);
if(Flag==1){
if(out_img[m*Y+n]==0)
 {
 out_img[m*Y+n]=1;
 if(in_img[m*Y+n]==255)
   {
   
   //printf("%d  %d \n",m,n);
   indexing(in_img,out_img,(m-1),(n-1));
   indexing(in_img,out_img,(m-1),n);
   indexing(in_img,out_img,(m-1),(n+1));
   indexing(in_img,out_img,m,(n-1));
   indexing(in_img,out_img,m,(n+1));
   indexing(in_img,out_img,(m+1),(n-1));
   indexing(in_img,out_img,(m+1),n);
   indexing(in_img,out_img,(m+1),(n+1));
   if(COUNT<=TH){
   DELREG[COUNT][0]=m;
   DELREG[COUNT][1]=n;
}  
   COUNT++;
if(COUNT==TH){
Flag=0;
}
   }
  }
 }
 return(0);
 }

 void bwareaopen_dj(unsigned char *in_img,unsigned char *out_img,int row,int col)
 {

 int i,j,xx;
X=row;
Y=col;

for(i=1;i{
for(j=1;j   {
    if(in_img[i*Y+j]==255 && out_img[i*Y+j]==0 )
    {
Flag=1;
    indexing(in_img,out_img,i,j);

    //printf("end of cluster :::size=%d \n",COUNT);

//area delete if below threshold amount
       if(COUNT       {
       for(xx=0;xx       {
       in_img[(DELREG[xx][0]) *Y +(DELREG[xx][1])]=0;
       }
       }
    COUNT=0;
   
    }
   }
}

 }




বুধবার, ৫ জুন, ২০১৩

Facebook emoji smileys 2013


New Emoji smiley codes for Facebook


Step 1: Download Android Emoji Font if you are seeing boxes in the below list.

Step 2: Install the font.
Step 3: Restart browser and open this blog page again.
Step 4: Now you will see the smileys instead silly boxes.
Step 5: Copy and paste them in facebook chat or comment or post. Even if you are seeing    
              just boxes , you can copy-paste them.



Note: Do not copy all of them at once. Facebook only shows 40 continuous smileys at once. 
================ LIST OF SMILEYS ================

Full list can be found here: Unicode List for Smileys

☀ ☁ ☔ ⛄ ⚡ 🌀 ♥ 💢 💤 💦 💨 💩 💪 ✨ 🔔 ✊ ✋ ✌ 👊 👍 ☝ 👆  👈 👉 👋 👏 👌 👎 👐