Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

This is code that I'm using for a project, and I can't seem to figure out what is wrong with my code. When I try

This is code that I'm using for a project, and I can't seem to figure out what is wrong with my code. When I try to run this code I get multiple errors. If possible can this code be debugged, and can you also describe the mistakes I've made and how you fixed them? Thank you very much!

image text in transcribed

This is also the code that I'm using for my second project. I have received feedback from my professor and I don't really know what he is trying to say my mistake is. He says "Increasing the brightness with a factor of 1.5, means some different pixels are saturated to 255 and look the same, which means what you do, basically can be the opposite of image enhancement!" If you can fix my code and tell me where I went wrong that would be amazing. I am a first-year student and I'm just now learning to code so thank you for all of your help!

image text in transcribed

from PIL import Image, ImageEnhance \# Load the image image = Image.open ("kids.tif") \# Convert to grayscale gray_image = image.convert("L") \# Save the grayscale image before changes in brightness gray_image.save("kids_grayscale before.tif") \# Enhance brightness enhancer = ImageEnhance.Brightness(gray_image) bright image = enhancer.enhance (1.5) \# Save the grayscale image after changes in brightness bright_image. Save("kids ograysale after.tif") \# Save the original colored image image. save ("kids original.tif")

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

SQL For Data Science Data Cleaning Wrangling And Analytics With Relational Databases

Authors: Antonio Badia

1st Edition

3030575918, 978-3030575915

More Books

Students also viewed these Databases questions

Question

1. Who should participate and how will participants be recruited?

Answered: 1 week ago