Image inpainting Using Wavelet Transform in Java-Project
-
i want java code for implementing Wavelet transform for inpainting the image...please anybody help me
-
i want java code for implementing Wavelet transform for inpainting the image...please anybody help me
We will help people who help themselves first. Do not expect us to do your homework, assignments, project, or supply source code. what-have-you-tried[^] If you encounter any difficulties with your coding, always consult Google first, everything else fails, then visit CP and ask questions related to specific issues.
-
We will help people who help themselves first. Do not expect us to do your homework, assignments, project, or supply source code. what-have-you-tried[^] If you encounter any difficulties with your coding, always consult Google first, everything else fails, then visit CP and ask questions related to specific issues.
K fine..i tried to convert an image from RGB to Ycrbr but it does work...Can u tell where i made the mistake... import java.awt.*; import java.awt.event.*; import java.util.*; import java.io.*; import javax.swing.*; import java.awt.image.*; import javax.imageio.ImageIO; public class Picture{ JFileChooser fileChooser = new JFileChooser(); final JFrame frame = new JFrame("Edit Image"); Container content; static BufferedImage image; BufferedImage image2; JLabel imageLabel; public Picture() { //asks for image file as input fileChooser.setDialogTitle("Choose an image file to begin:"); fileChooser.showOpenDialog(frame); File selectedFile = fileChooser.getSelectedFile(); if (fileChooser.getSelectedFile() != null) { try { //reads File as image image = ImageIO.read(selectedFile); } catch (IOException e) { System.out.println("Invalid image file: " + selectedFile); System.exit(0); } } else { System.out.println("No File Selected!"); } } public int width() { //returns width of present image int width = image.getWidth(); return width; } public int height() { //returns height of present image int height = image.getHeight(); return height; } /* public void getImage() { this.image = image2; } */ public void saveImage() { //saves current image as JPEG fileChooser.setDialogTitle("Save this image?"); fileChooser.showSaveDialog(frame); try { //writes new file ImageIO.write(this.image, "JPG", fileChooser.getSelectedFile()); } catch (IOException f) { System.out.println("Saving failed! Could not save image."); } } public void show() { //set frame title, set it visible, etc content = frame.getContentPane(); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.setResizable(false); //add the image to the frame ImageIcon icon = new ImageIcon(image); imageLabel = new JLabel(icon); frame.setContentPane(imageLabel); //add a menubar on the frame with a single option: saving the image JMenuBar menuBar = new JMenuBar(); frame.setJMenuBar(menuBar); JMenu progName
-
K fine..i tried to convert an image from RGB to Ycrbr but it does work...Can u tell where i made the mistake... import java.awt.*; import java.awt.event.*; import java.util.*; import java.io.*; import javax.swing.*; import java.awt.image.*; import javax.imageio.ImageIO; public class Picture{ JFileChooser fileChooser = new JFileChooser(); final JFrame frame = new JFrame("Edit Image"); Container content; static BufferedImage image; BufferedImage image2; JLabel imageLabel; public Picture() { //asks for image file as input fileChooser.setDialogTitle("Choose an image file to begin:"); fileChooser.showOpenDialog(frame); File selectedFile = fileChooser.getSelectedFile(); if (fileChooser.getSelectedFile() != null) { try { //reads File as image image = ImageIO.read(selectedFile); } catch (IOException e) { System.out.println("Invalid image file: " + selectedFile); System.exit(0); } } else { System.out.println("No File Selected!"); } } public int width() { //returns width of present image int width = image.getWidth(); return width; } public int height() { //returns height of present image int height = image.getHeight(); return height; } /* public void getImage() { this.image = image2; } */ public void saveImage() { //saves current image as JPEG fileChooser.setDialogTitle("Save this image?"); fileChooser.showSaveDialog(frame); try { //writes new file ImageIO.write(this.image, "JPG", fileChooser.getSelectedFile()); } catch (IOException f) { System.out.println("Saving failed! Could not save image."); } } public void show() { //set frame title, set it visible, etc content = frame.getContentPane(); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.setResizable(false); //add the image to the frame ImageIcon icon = new ImageIcon(image); imageLabel = new JLabel(icon); frame.setContentPane(imageLabel); //add a menubar on the frame with a single option: saving the image JMenuBar menuBar = new JMenuBar(); frame.setJMenuBar(menuBar); JMenu progName
You should add this code to your original question so that everyone can chip in to help. More eyes are better.
-
You should add this code to your original question so that everyone can chip in to help. More eyes are better.
K thanks for ur suggestion :)