• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer
projectsgeek

ProjectsGeek

Download Mini projects with Source Code, Java projects with Source Codes

  • Home
  • Java Projects
  • C++ Projects
  • VB Projects
  • PHP projects
  • .Net Projects
  • NodeJs Projects
  • Android Projects
    • Project Ideas
      • Final Year Project Ideas
      • JSP Projects
  • Assignment Codes
    • Fundamentals of Programming Language
    • Software Design Laboratory
    • Data Structure and Files Lab
    • Computer Graphics Lab
    • Object Oriented Programming Lab
    • Assembly Codes
  • School Projects
  • Forum

Implement a Program for Feature Extraction in 2D Colour Images (any features like Colour, Texture etc.)

April 29, 2012 by ProjectsGeek Leave a Comment

Implement a Program for Feature Extraction in 2D Colour Images (
 features like Colour, Texture etc.)
Aim  : To implement Program for Feature Extraction in 2D Colour Images .
Objective : To study Program for Feature Extraction in 2D Colour Images  for features like ..Colour and Textures .
Given Feature Extraction  source code is implemented using Java language . The input to the program is image file that is to be modified using program by changing colour .
 Feature Extraction  source code :
 
 package com.prac.prac;  
 import java.awt.*;  
 import java.awt.image.BufferedImage;  
 import java.io.*;  
 import java.util.*;  
 import javax.imageio.ImageIO;  
 public class Exatraction {  
      private static BufferedImage orignal,answer;   
      public static void main(String[] args) throws IOException{  
           File orignal_f=new File("a.jpg");  
           orignal = ImageIO.read(orignal_f);  
            answer=imageHistogram(orignal);  
           writeImage("featureExtraction");  
      }  
      private static void writeImage(String output) throws IOException {  
     File file = new File(output+".jpg");  
     ImageIO.write(answer, "jpg", file);  
   }  
       private static int colorToRGB(int alpha, int red, int green, int blue) {  
          int newPixel = 0;  
          newPixel += alpha; newPixel = newPixel << 8;  
          newPixel += red; newPixel = newPixel << 8;  
          newPixel += green; newPixel = newPixel << 8;  
          newPixel += blue;  
          return newPixel;  
        }  
       public static BufferedImage imageHistogram(BufferedImage input) {  
                 BufferedImage redGraph = new BufferedImage(input.getWidth(),input.getHeight(),input.getType());  
          for(int i=0; i<input.getWidth(); i++)   
          {  
            for(int j=0; j<input.getHeight(); j++)   
            {  
                 int alpha =new Color(input.getRGB (i, j)).getAlpha();  
              int red = new Color(input.getRGB (i, j)).getRed();  
              int green = new Color(input.getRGB (i, j)).getGreen();  
              int blue = new Color(input.getRGB (i, j)).getBlue();  
              redGraph.setRGB(i, j, colorToRGB(alpha, 0,0,blue));  
            }  
          }  
          return redGraph;  
        }  
 }  

Input to the Program :

Implement a Program for Feature Extraction in 2D Colour Images (any features like Colour, Texture etc.) 5

Output from the Program :

Implement a Program for Feature Extraction in 2D Colour Images (any features like Colour, Texture etc.) 6

 

Other Projects to Try:

  1. Implementation of Single Pass Algorithm for Clustering
  2. To Implement Web Crawler in Java BE(IT) CLP-II Pratical
  3. Multiple Inheritance in java program
  4. To Implement a Program Retrieval of Documents using Inverted Files
  5. Covert Communication , Diigtal Images

Filed Under: CLP-II

Reader Interactions

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Primary Sidebar

Tags

.Net Projects Download Android Project Ideas Android Projects Angular 2 Assembly Codes C # Projects C & C++ Projects C++ Projects Class Diagrams Computer Graphics Database Project Data Mining Projects DataScience Projects Datastructure Assignments Download Visual Basic Projects Electronics project Hadoop Projects Installation Guides Internet of Things Project IOS Projects Java Java Interview Questions Java Projects JavaScript JavaScript Projects java tutorial JSON JSP Projects Mechanical Projects Mongodb Networking Projects Node JS Projects OS Problems php Projects Placement Papers Project Ideas Python Projects seminar and presentation Struts

Search this Website


Footer

Download Java Project
Download Visual Basic Projects
Download .Net Projects
Download VB Projects
Download C++ Projects
Download NodeJs Projects
Download School Projects
Download School Projects
Ask Questions - Forum
Latest Projects Ideas
Assembly Codes
Datastructure Assignments
Computer Graphics Lab
Operating system Lab
australia-and-India-flag
  • Home
  • About me
  • Contact Form
  • Submit Your Work
  • Site Map
  • Privacy Policy