Consider the Imager class in Module 3. Create a new class based on Imager called Imager2 with three new functions:
import cv2
#greyscale
def grayscale():
img=cv2.imread('modern.jpg',0)
cv2.imshow('grayscale',img)
cv2.waitKey()
cv2.destroyAllWindows()
#blackandwhite
def blackandwhite():
originalImg = cv2.imread('modern.jpg')
gray = cv2.cvtColor(originalImg, cv2.COLOR_BGR2GRAY)
(thresh, blackAndWhiteImage) = cv2.threshold(gray, 127, 255, cv2.THRESH_BINARY)
cv2.imshow('Black white image', blackAndWhiteImage)
cv2.waitKey(0)
cv2.destroyAllWindows()
#edgedetection
def edgedetection():
image = cv2.imread('modern.jpg',0)
cany = cv2.Canny(image, 50, 120)
cv2.imshow('Canny', cany)
cv2.waitKey(0)
cv2.destroyAllWindows()
Image Class: Computer Vision (Allegro Application) (10 marks) Computer Vision is the process of analyzing input...
use MATLAB to upload the following:
an image that you want to process (can be taken yourself or
downloaded from the internet)
a script that processes the image in TWO ways.
manipulates the colors
averages pixels together
Please make sure the script displays the images (like how I did
with the 40 and 80 pixel averaging) so I can easily compare them to
the original. Make sure to COMMENT your code as well.
Homework 13 Please upload the following: an...
The ACME Manufacturing Company has hired you to help automate
their production assembly line. Cameras have been placed above a
conveyer belt to enables parts on the belt to be photographed and
analyzed. You are to augment the system that has been put in place
by writing C code to detect the number of parts on the belt, and
the positions of each object. The process by which you will do this
is called Connected Component Labeling (CCL). These positions...