Python Jupyter Notebook University Homework
Завдання 1:
Drawing circles around objects in an image
a. Write a Python function IdentifyObjects to be called with 1 parameter; an input file. It identifies the objects or shapes in the image and draws a circle around the identified shapes.
Example:
Input: partyballoons-1.jpg
Function Call: IdentifyObjects("partyballoons-1.jpg")
b. Test your function using the image partyballoons-2.jpg and explain the outcome.
Завдання 2:
a. Write a Python function ImageHistogramGenerator to be called with 1 parameter; an input file. It returns the object that represents the calculated histogram.
Example:
Input: image1.jpg
Function Call: ImageHistogramGenerator("image1.jpg")
💡 TIP: You may plot your histogram using matplotlib to check if it looks correct. However, please be sure to comment out / disable your plots when calling the following FindDuplicateImages function, since they may cause memory issues on the JupyterLab.
b. Write a Python function FindDuplicateImages that can be called with three parameters:
inputDir1: the path to the first directory, which contains all the images.inputDir2: the path to the second directory, which contains a subset of the images.similarityThreshold: a threshold parameter, which ranges between 0.0 to 1.0.
The algorithm:
Generate the histograms for all images in the input directory 1 and input directory 2.
Calculate the cosine distance between the histogram of the images in the input directory 2 and all other images in the input directory 1.
Generate a pandas DataFrame and display it for visualization of the comparison results. The DataFrame should consist of the following three columns:
inputDir1: displays the image name in the directory.inputDir2: displays the image name in the directory.similarityThreshold: displays the similarity (0.0 - 1.0)
Example:
Function call: FindDuplicateImages("inputDir1", "inputDir2","similarityThreshold")
Write your own algorithm. You may need to consider what colors your histogram works with and whether your input images need to be preprocessed first (e.g., color space conversion). DO NOT USE cv2.calcHist !
Additionally, answer the following questions in written form:
1. Can the created histogram be used to reconstruct the image? If no, what other information would be needed?
2. Explain the differences between an individual color histogram, a combined color histogram and an intensity histogram.
a) What information is displayed in each of these diagrams?
b) What histogram type did we use?
3. Explain the concept of histogram bins.
Applications 4
-
217 2 0 Good evening, can do your tasks, but need little bit discuss about it. After that i can say right deadlines and price👌
Current freelance projects in the category Python
Find a product feed (Google Merchant XML) for a website on OpenCart
16 USD
It is necessary to find a direct link to the active product feed (XML) of a competitor for Google Merchant Center Platform (CMS): OpenCart / ocStore Find the original feedRequirements for the result: Working link to the XML file Python, Data Parsing ∙ 6 hours 5 minutes back ∙ 18 proposals |
Development of a TikTok farm (content factory)It is necessary to develop a system for centralized management of multiple TikTok accounts with automatic content publishing, using individual proxies and simulating natural account activity. Functional Requirements1. Account Management Adding and removing TikTok accounts.… Python, Bot Development ∙ 17 hours 32 minutes back ∙ 14 proposals |
Improve the performance of Claude Code and work on software development.I am currently developing CRM and Analytics software. I am using Claude Code, but I understand that the results are not the best in terms of changes. There are 2 tasks - Need help creating a preset for skills, MD, and so on to improve quality. Take verified ones that have been… AI & Machine Learning, Python ∙ 1 day back ∙ 21 proposals |
OCR systemA system for recognizing text on postal envelopes (index for whom - only numbers). The text can sometimes be handwritten. Recognition of stamps (counting quantity and denomination) Python ∙ 1 day 3 hours back ∙ 21 proposals |
Looking for a white-label solution for a betting company for rent. |