QuestionQuestion

Make a two programming code for imaging processing.
1) Flip horizontally (Mirror): Mirror the image so that the new image is the same right-to-left as the original was left-to-right.
2) Change background/foreground color: Pick an object with a specific color and change it to a different color. For example, change background color of a passport photo and change the color of a rose. (with explanations for me to understand why)

Solution PreviewSolution Preview

These solutions may offer step-by-step problem-solving explanations or good writing examples that include modern styles of formatting and construction of bibliographies out of text citations and references. Students may use these solutions for personal skill-building and practice. Unethical use is strictly forbidden.

import java.io.File;
import java.io.IOException;
import java.awt.Color;
import java.awt.image.BufferedImage;
import javax.imageio.ImageIO;
import java.util.Scanner;

/*
*   - Image Processing
*/
public class PA7Lastname1Firstname1 {
   
    // Function to Flip Image Horizontally
    public static BufferedImage flipHorizontally(BufferedImage inputImage) {
       int width = inputImage.getWidth();
       int height = inputImage.getHeight();
       // Construct output image
       BufferedImage outputImage = new BufferedImage(width, height,
                                                      BufferedImage.TYPE_INT_ARGB);
       // Iterate over all pixels
       for (int y = 0; y < height; y++) {
            for (int x = 0; x < width/2; x++) {
                // Get the two pixel values at left and right
                int p1 = inputImage.getRGB(x, y);
                int p2 = inputImage.getRGB(width-x-1, y);
                // Swap pixel values to achieve flip transformation
                outputImage.setRGB(x, y, p2);...

By purchasing this solution you'll be able to access the following files:
Solution.zip.

$60.00
for this solution

PayPal, G Pay, ApplePay, Amazon Pay, and all major credit cards accepted.

Find A Tutor

View available Java Programming Tutors

Get College Homework Help.

Are you sure you don't want to upload any files?

Fast tutor response requires as much info as possible.

Decision:
Upload a file
Continue without uploading

SUBMIT YOUR HOMEWORK
We couldn't find that subject.
Please select the best match from the list below.

We'll send you an email right away. If it's not in your inbox, check your spam folder.

  • 1
  • 2
  • 3
Live Chats