This MATLAB project demonstrates how to capture an image using a webcam, apply gradient operators (like the Sobel filter) to compute the image gradients, and use these gradients to sharpen the image.
This project captures an image from a connected webcam and applies image processing techniques to enhance its sharpness. The sharpening is done using gradient operators, specifically the Sobel operator, which highlights the edges and fine details of the image.
- MATLAB (R2014a or later)
- Image Processing Toolbox
- A connected webcam
-
Clone the Repository:
git clone https://github.com/your-username/webcam-image-sharpening.git cd webcam-image-sharpening -
Open MATLAB:
Open MATLAB and navigate to the cloned repository folder.
-
Ensure Your Webcam is Properly Connected:
Make sure your webcam is connected and recognized by MATLAB.
-
Run the Script:
Execute the
webcam_image_sharpening.mscript in MATLAB.webcam_image_sharpening -
Capture Image
The script will initialize the webcam and capture an image.
-
Image Processing
The script converts the captured image to grayscale, applies the Sobel operator to compute gradients, and enhances the image by sharpening it using the gradient magnitude.
-
Display Results
The original grayscale image, the gradient magnitude, and the sharpened image will be displayed side by side.