K thanks for ur suggestion :)
User 10533379
Posts
-
Image inpainting Using Wavelet Transform in Java-Project -
Java Code for converting RGB image to Ycbcr imageI tired this code for converting RGB image to Ycbcr but it doesnt work this code also contain to covert RGB to Grayscale 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
-
Image inpainting Using Wavelet Transform in Java-ProjectK 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
-
Java Code for Wavelet Transform based algorithm for Image inpaintingHow to get a inpainted image using wavelet based algotithm
-
Image inpainting Using Wavelet Transform in Java-Projecti want java code for implementing Wavelet transform for inpainting the image...please anybody help me