Skip to main content

CST 205 Portfolio

Image Manipulations using JES
This is a showcase of the various image manipulation functions I've written, or worked on with SCSI Logic, from the labs I've done so far in 205.

Rose Colored Glasses
This function reduces the green and blue values of each pixel in the picture in order to give it pink overtones, and then repaints the target photo. 







Better Black and White
This function turns a photo into grayscale by multiplying the RGB values of each pixel by certain weights in order to get an average of each pixel. In turn, this value is the luminance of each pixel. These new values are then applied to the existing original pixels.








Negative
Turns a photo into its negative by subtracting the RGB value of each pixel from the maximum value allowed (255, since the RGB model is an 8-bit model). JES's wrap around overflow is on by default, which prevents potential errors due to integer under/overflow.









Mirror - Bottom to Top
Mirrors the bottom half of an image by copying all the pixels from the bottom half (entire width of image, half height), and then copies it to the top half.











Shrink
This function shrinks a source image by creating a blank target image with the desired dimensions, copies every other pixel in the original photo, and then copies it to the target photo. Essentially, it samples half of the pixels from the original photo.








Collage
To create a collage, this function takes six photos of the same size and copies them to the appropriate coordinate values on the image. Additionally, it applies a random image effect from the ones previously shown before it adds the image to it. It's fun to play around with it to see how many different types of collages result because of the random image effects. The most difficult part was getting the dimensions right for each image in the collage.










Red Eye Reduction
This red eye reduction function works by calculating the "distance" between a red pixel and the pixels in a designated region. If the difference between red values is too high, then the pixel is set to the color black. Adjusting the threshold values and finding the best one depends on the image and the targeted region.








Artify
After getting all the RGB pixel values in an image, these values are then set to either red, green or blue according to which range they fall in. This causes sharp, discrete regions of color instead of continuous regions, causing the pixelated, exaggerated colorizing effect seen below.








Green Screen (chroma key)
Similar to the red eye reduction function, this function looks for pixels with values that fall within certain shades of green. If the pixel is within this range, it replaces it with a pixel/color of choice.







Thanksgiving Card
This function superimposes three images on top of another, and uses the chroma key function to make it happen. Because JES does not work with alpha channels directly, and displays transparent backgrounds as black pixels, Ryan came up with the brilliant idea to use the chroma key function to replace black pixels with the pixels from the desired source image. In fact, the leaf border is the first image copied to the canvas, and then its corresponding black pixel regions are then chroma keyed with the actual image in the middle.










Advanced Technique - Line Drawing
This function takes an image, converts it to black and white, and then calculates and compares the luminance value of each pixel in the image, along with the pixels 1 pixel to the right and below. If the difference is larger than the luminance threshold, it sets the color of the pixel to black, otherwise it turns it white. Designing the function was relatively straightforward, but I had to write the getLuminance() helper function in order to avoid code deprecation and to keep clean design in mind. Initially, my threshold values were too high and the line drawn effect was quite muted - after playing around with several values, I settled on the current value seen below as the best balance between too much "black pixel" noise, and distinct, clean lines. The most difficult part of the algorithm was ensuring that the for loops did not go out of bounds of the photo. Additionally, I thought adding the print statements was good practice for debugging.







Comments

Popular posts from this blog

CST 300 - Week 4

Educational Goals My current educational goals are to finish my bachelor's degree in computer science while also gaining a deep understanding of the fundamentals along the way. I have always believed that a solid understanding of the fundamentals goes a long way in any skill since you always refer back to them. When I have gotten stuck on a problem or some skill in the past, I have always taken a step back, broken down things into smaller pieces and remembered my fundamentals, and doing so has helped me through a lot of academic and professional work so far. Although I already know basic programming and data structures, I want to learn more about them and discover new ways of thinking in order to solve complex problems.  Career Goals I started a career as a full-time software test analyst about two months ago. Even though my job doesn't involve a lot of programming, getting a degree in computer science would be really helpful in all aspects of my career, such as identif...

CST 300 - Week 2

Introduction This was a busy week for class! I started writing the first draft of my paper and got it done in a few days. It took a lot of thinking and research to get it done, but I'm glad I didn't procrastinate. Revising the first draft might take quite and effort as well. In the past when I would write geological reports, I found revising them was the hardest part. Part I. Speaking of hardest part, time management is something I am still getting used to, especially with this week's workload. Out of the items in the time management article, the top 3 things I feel like I am best at are: Creating a good study space Taking notes Reading  However, I could use some work on: Sticking to a schedule Revising lecture notes (on time) Studying within 30 min. of going to sleep Part II. Here's the activity log I filled out. It documented one of my Mondays at work. Part III. Project management skills are something I feel like I don't have enoug...

CST 300 - Week 3

This week, we learned about ethics, ethical frameworks, and held a discussion about an infamous contemporary ethical scenario. After reading through this week's material I feel as if I have a much better understanding of ethics in society, and the motives behind people's decisions whether good or bad.  I'll admit I didn't pay much as much in depth discussion to Edward Snowden when he originally leaked all that information back in 2013, but after this week's discussion it really got me thinking about proper ethical behaviors in society and made me question much privacy I actually have as a US citizen.  Note: NSA, if you're reading this, say hi to my friend Chris for me. He's around the DC area somewhere and I'm sure you've run into him a couple of times. I swear he's a nice guy and doesn't bite.  Time Management and Studying I am getting much better at concentrating while working on papers and studying material. Unfortunately, I shoul...