Problem
Write a function named rect_or_triangle to determine the shape of objects. (triangle, square)
Input to the function must be a single image represented as numpy array. Determine and apply necessary preprocessing steps (thresholding, noise removal, edge detection etc.)Determine the shapes in the image utilizing the contours.Hints: cv2.findContours, cv2.approxPolyDPThe function should be able to detect multiple objects in a given image.Output of the function must be list of strings, containing the name of the objects in the image.eg. If the image contains 2 triangles and 3 squares: ["triangle", "square", "square", "triangle", "square"]