Latest Tutorials| Questions and Answers|Ask Questions?|Site Map

Home Answers Viewqa Java3D image processing

View Questions and Answers by Category


Have Programming Question? Ask it here!

Antony Devassy
image processing
1 Answer(s)      6 years and 3 months ago
Posted in : Java3D

View Answers

September 3, 2008 at 6:31 PM

Hi friend,

One way to convert a color image to gray scale, is to change the color space of the image. The sample code below shows how to change the color space:

ColorSpace cs = ColorSpace.getInstance(ColorSpace.CS_GRAY);
ColorConvertOp op = new ColorConvertOp(cs, null);
BufferedImage image = op.filter(bufferedImage, null);

The easiest way to convert a color image to a gray scale image is to simply draw the color image to a gray scale BufferedImage. The sample code below shows how to draw the colored image to a gray scale BufferedImage:

BufferedImage image = new BufferedImage(width, height, BufferedImage.TYPE_BYTE_GRAY);
Graphics graph = image.getGraphics();
graph.drawImage(colorImage, 0, 0, null);



Related Tutorials/Questions & Answers:
image Processing
image Processing   BCIF Image Compresssion Algorithm s alossless image Compression algorithm ,Pleas Help Me weather it can support only 24 bit bmp images
Image processing
Image processing  i want a browsing program in java in which we hv a small img and we hv to browse this img on a big image so that we can find the similar type of image in big img
image Processing
image Processing  Please give Me a JPEG or GIf "LOSS LESS" Image Compression and Decompression Source Code Please Help Me I don't want links Kindly help me Compression ratio not matter
image processing - Java3D
image processing  hii i have to compare 2 images. for this i try to convert image into greyscale. i think the greyscale comparisonn is more effective than that of colour. pls give me the processing details.  Hi friend
image processing in java
image processing in java  public class testing { static BufferedImage image; public static void main(String[] args) throws IOException...;Integer>(); image = File("nn33.png")); int w
Image Processing Java
Image Processing Java  Using This Code I Compressed A JPEG Image And the Original Size of the image is 257kb and The Compressed Image Size Is 27kb...; import; /* * Shows how to save an image
jaav image processing
jaav image processing  hello there, i am an engineering student.. i am going to do and project in whcih the software provides the user... to destination over an image.. can you please guide me on how to start
Compute the image processing - Java Beginners
Compute the image processing  Hi, Question 1: I have some... code here to find the averaging of the image (grey image) also, How do i compute... the subtraction of the image using hte g(x,y) = |f1(x,y) - f2(x,y) How do i change
Image Processing Tutorials in Java Programming Language
Tutorials and example of processing the image in the Java Programming Language Java Programming Language is providing many APIs for processing the image... image processing routine in the Java Program. This is available with JDK
how to make use of jerry's java image processing filter in java application?is there anyway to do this?
how to make use of jerry's java image processing filter in java application?is there anyway to do this?   how to make use of jerry's java image processing filter in java application?is there anyway to do
data processing is
data processing is   data processing is   Data processing is associated with commercial work. Data processing is also referred as Information System. Data processing is basically used for analyzing, processing
Steps for the payment gateway processing?
Steps for the payment gateway processing?  Steps for the payment gateway processing
request processing in servlets
request processing in servlets  how request processing is done in servlets and jsp   Please visit the following links: JSP Tutorials Servlet Tutorials Here, you will find several examples of processing request
Processing Sequence of DispatcherServlet
In this section, you will get to know about the processing sequence of DispatcherServlet
The product of data processing is
The product of data processing is   The product of data processing is 1. Data 2. Information 3. Software 4. Computer 5. All of the above   Answer: 3. Software
Abort JSP processing
Abort JSP processing  Can I just abort processing a JSP?   Yes. You can put a return statement to abort JSP processing
Speech Processing - Java Beginners
Speech Processing  I want to implement Speech Processing in Java. How can I do It? Please Answer me
text processing program
text processing program  how can i compare letter by letter? what i was trying to do is a program that can define what is root word,prefix and suffix. plz help
Form Processing Problem
Form Processing Problem  I am trying to create a Circular Page. This is the Code where the circular is updated and asks for Circular Reference number and date. <%@ page import="*" %> <% //to get
image  how to add the image in servlet code
JavaScript array processing
JavaScript array processing       By processing array we simply mean that processing.... In this example of processing JavaScript array we have three array objects emp1, emp2
Image  how to insert image in xsl without using xml. the image was displayed in pdf..Please help me
Image  how to insert image in xsl without using xml. the image was displayed in pdf..Please help me
Image  how to insert image in xsl without using xml. the image was displayed in pdf..Please help me
The CPU(Central processing unit)consist of
The CPU(Central processing unit)consist of  The CPU(Central processing unit)consist of 1. Input, Output, and Processing 2. Control Unit, Primary storage, and Secondary storage 3. Control unit, arithmetic logic unit
JDBC Batch Processing
JDBC Batch Processing In this section we are discussing about JDBC Batch processing. You will learn how to write Java programs for JDBC batch processing. The JDBC Batch processing is the mechanism where a group of related SQL statements
Parallel Processing & Multitasking
Parallel Processing & Multitasking       Multitasking & Multithreading Multitasking allow to execute more than one tasks at the same time, a task being a program
Processing stored procedure in MySQL - SQL
Processing stored procedure in MySQL  Dear All java with mysql developer..... i need to convert my SQL procedure to MySQL database... here is my Stored procedure in SQL.... create or replace procedure INVNAMES (bno
Spring 3.2 Asynchronous Request Processing
In this section, you will learn about Asynchronous Request Processing in Spring MVC 3.2.
Processing XML with Java
; } Processing XML with Java XML is cross-platform software, hardware... stand for "Java API for XML Processing". It is used for processing...-based and read-write API on Java platform for processing XML. It provides full