Welcome to My Website

this is were everything about me will be!

Home

This is the home section where you can find more info about me

Games

welcome what would you like to play today?

Art

my art portfolio!

Contact

contact information

import cv2 import numpy as np # Load the image image = cv2.imread('image.jpg') # Convert the image to grayscale gray = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY) # Apply Gaussian blur to reduce noise blurred = cv2.GaussianBlur(gray, (5, 5), 0) # Detect edges using Canny edge detection edges = cv2.Canny(blurred, 50, 150) # Find contours in the image contours, hierarchy = cv2.findContours(edges, cv2.RETR_EXTERNAL, cv2.CHAIN_APPROX_SIMPLE) # Loop through each contour for contour in contours: # Calculate the area of the contour area = cv2.contourArea(contour) # Ignore contours with a small area if area < 100: continue # Find the bounding rectangle of the contour x, y, w, h = cv2.boundingRect(contour) # Draw a rectangle around the contour cv2.rectangle(image, (x, y), (x + w, y + h), (0, 255, 0), 2) # Display the image cv2.imshow('Image', image) cv2.waitKey(0) cv2.destroyAllWindows()