https://github.com/chowdhuryj-github/pixelreader
A MSOE Lab Project for a JavaFX application on image manipulation using file handling. Can perform operations such as calculating median and mean of pixels and generating a new image.
https://github.com/chowdhuryj-github/pixelreader
data-structures image-processing javafx
Last synced: 9 months ago
JSON representation
A MSOE Lab Project for a JavaFX application on image manipulation using file handling. Can perform operations such as calculating median and mean of pixels and generating a new image.
- Host: GitHub
- URL: https://github.com/chowdhuryj-github/pixelreader
- Owner: chowdhuryj-github
- License: mit
- Created: 2024-06-04T15:03:37.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-06-08T05:47:01.000Z (over 1 year ago)
- Last Synced: 2025-01-20T23:39:41.751Z (11 months ago)
- Topics: data-structures, image-processing, javafx
- Language: Java
- Homepage:
- Size: 41.9 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# The PixelReader Lab Collection
Welcome to the PixelReader Lab Collection! This repository is a data structures project that I've worked on during my freshman year at the Milwaukee School of Engineering!
## Lab 1 | Mean Image Median
Worked on creating a program that will read images in the PPM format and produce an image that contains the median and average of the input images. The program is designed to accept a operation of mean or median and then output a filename after inputting two or more image files.
Also implemented the ```MeanImageMedian``` class that contains methods to be called by the program. Implemented the following class methods:
* ```Image readPPMImage(Path imagePath)``` — Reads the ```.ppm``` image file specified by the image path
* ```void writePPMImage(Path imagePath, Image image)``` — Writes image to a ```.ppm``` image file specified by the image path
* ```Image calculateMedianImage(Image[] inputImages)``` — calculates the median color for each pixel in the input images
* ```Image calculateMeanImage(Image[] inputImages)``` — calculates the mean color for each pixel in the input images
## Lab 2 | JavaFX Application
Created a graphical user interface (GUI) to load and display images. Made the following updates:
* Declared ```readPPMImage()``` and ```writePPMImage()``` as private methods
* Implemented ```readImage()``` and ```writeImage()``` methods with the same parameters as ```readPPMImage()``` and ```writePPMImage()``` that will call ```readPPMImage()``` and ```writePPMImage()``` when the file extention on the Path ends with ```.ppm```.
* Ensured ```calculateMedianImage()``` and ```calculateMeanImage()``` calculate alpha value for each pixel.
* Update ```readImage()``` and ```writeImage()``` methods to use JavaFX classes to add support for reading and writing JPG and PNG file formats.
## Lab 3 | GUI Fnuctionality Extended
Added the following updates to the graphical user interface:
* Load multiple input images
* Button to request generation and display of a "median" image
* Button to request generation and display of a "mean" image
* Button to save the generated image
## Lab 5 | A Functional Programming Approach
Updated the program to read and write images in a custom binary format. Updated the methods to use a functional programming approach. Added the following extra functionality:
* ```Max``` — produces an output image where the pixel components for the output image are selected as the maximum value from the input images.
* ```Min``` — produces an output image where the pixel components for the output image are selected as the minimum value from the input images.
* ```Random``` — produces an output image where the pixel components for the output image are selected at random from the input images.