{"id":20911692,"url":"https://github.com/abdullah-alrefaey/computer-vision-tasks","last_synced_at":"2025-06-26T15:32:38.773Z","repository":{"id":124055850,"uuid":"420290482","full_name":"Abdullah-Alrefaey/Computer-Vision-Tasks","owner":"Abdullah-Alrefaey","description":null,"archived":false,"fork":false,"pushed_at":"2021-10-23T02:07:04.000Z","size":66423,"stargazers_count":2,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-06T23:38:54.215Z","etag":null,"topics":["computer-vision","gui","pyqt5","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Abdullah-Alrefaey.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-10-23T02:03:46.000Z","updated_at":"2023-07-04T14:24:29.000Z","dependencies_parsed_at":"2024-08-19T11:50:39.988Z","dependency_job_id":null,"html_url":"https://github.com/Abdullah-Alrefaey/Computer-Vision-Tasks","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Abdullah-Alrefaey/Computer-Vision-Tasks","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Abdullah-Alrefaey%2FComputer-Vision-Tasks","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Abdullah-Alrefaey%2FComputer-Vision-Tasks/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Abdullah-Alrefaey%2FComputer-Vision-Tasks/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Abdullah-Alrefaey%2FComputer-Vision-Tasks/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Abdullah-Alrefaey","download_url":"https://codeload.github.com/Abdullah-Alrefaey/Computer-Vision-Tasks/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Abdullah-Alrefaey%2FComputer-Vision-Tasks/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262094654,"owners_count":23258013,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["computer-vision","gui","pyqt5","python"],"created_at":"2024-11-18T14:23:21.083Z","updated_at":"2025-06-26T15:32:38.732Z","avatar_url":"https://github.com/Abdullah-Alrefaey.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 style=\"text-align: center;\"\u003e Computer Vision Course Tasks\u003c/h1\u003e\n\nIn this Repository we present a variety of Image Processing Techniques implemented from scratch using `Python` with help of some helpful packages.\n\n## Table of contents\n### \u003ca href=\"#installation_h\"\u003eInstallation\u003c/a\u003e\n\n### \u003ca href=\"#usage_h\"\u003eUsage\u003c/a\u003e\n\n### \u003ca href=\"#image-processing_h\"\u003eImage Processing\u003c/a\u003e\n* [Adding Noise To Image](#1-adding-noise-to-image)\n* [Image Filtering](#2-image-filtering)\n* [Edge Detection](#3-edge-detection)\n* [Image Histogram and Thresholding](#4-image-histogram-and-thresholding)\n* [Hybrid Images](#5-hybrid-images)\n\n\n### \u003ca href=\"#boundary-detection_h\"\u003eBoundary Detection\u003c/a\u003e\n* [Hough Transformation (Lines and Circles Detection)](#1-hough-transformation)\n* [Active Contour Model (Snake)](#2-active-contour-model)\n\n### \u003ca href=\"#features-detection-and-image-matching_h\"\u003eFeatures Detection and Image Matching\u003c/a\u003e\n* [Feature Extraction In Images Using Harris Operator](#1-extract-the-unique-features-in-all-images-using-harris-operator)\n\n* [Feature Descriptors Using Scale Invariant Features (SIFT) Algorithm](#2-feature-descriptors-using-scale-invariant-features-sift-algorithm)\n\n* [Matching the Image Set Features](#3-matching-the-image-set-features)\n\n### \u003ca href=\"#image-segmentation_h\"\u003eImage Segmentation\u003c/a\u003e\n* [Using Thresholding Techniques](#1-thresholding-segmentation)\n* [Using Clustering Methods](#2-clustering-segmentation)\n\n### \u003ca href=\"#face-detection-and-recognition_h\"\u003eFace Detection and Recognition\u003c/a\u003e\n* [Face Detection (Color or Gray-scale)](#1-face-detection)\n* [Face Recognition (Based on PCA/Eigen Analysis)](#2-face-recognition)\n\n\u003cdiv style=\"page-break-after: always;\"\u003e\u003c/div\u003e\n\n\n# \u003ca name=\"installation_h\"\u003eInstallation\u003c/a\u003e\n\nTo install the required libraries and dependencies, open your terminal in the repository directory and run this command:\n```\npip install -r requirements.txt\n```\n\n### Script's Components\nrequirements.txt contains the versions of each libraries, if already installed the installation will be skipped:\n- Scipy\n- Numpy\n- Pyqtgraph\n- PyQt5\n- opencv-python\n- Pillows\n- Matplotlib\n- scikit_learn\n\n# \u003ca name=\"usage_h\"\u003eUsage\u003c/a\u003e\nThe **GUI** is composed of many tabs; each tab contains some push buttons, combo boxes or sliders, input texts and some widgets to view the images.\n\nEach category of implemented Algorithms is displayed in a separate tab in the GUI.\n\nSimply you could load the image you want to apply the algorithm on via push buttons, adjust the required parameters then apply the selected algorithm.\n\nHere's the view of the UI tabs without loading any images or applying any algorithms.\n\n\u003cdetails\u003e\n  \u003ch4\u003e\u003csummary\u003eMain UI Tabs\u003c/summary\u003e\u003c/h4\u003e\n  \n  \u003cimg src=\"resources/UI/Noise_Filters_Edges_Tab.png\" alt=\"Noise_Filters_Edges_Tab\"\n  name=\"Noise_Filters_Edges_Tab\" target=\"_blank\" width=\"500\" height=\"400\"\u003e\n  \n  \u003cimg src=\"resources/UI/Histogram_Tab.png\" alt=\"Histogram_Tab\" \n  name=\"Histogram_Tab\" width=\"500\" height=\"400\"\u003e\n  \n  \u003cimg src=\"resources/UI/Hybrid_Tab.png\" alt=\"Hybrid_Tab\" \n  name=\"Hybrid_Tab\" width=\"500\" height=\"400\"\u003e\n  \n  \u003cimg src=\"resources/UI/Hough_Tab.png\" alt=\"Hough_Tab.png\"\n  name=\"Hough_Tab\" width=\"500\" height=\"400\"\u003e\n  \n  \u003cimg src=\"resources/UI/Active_Contour_Tab.png\" alt=\"Active_Contour_Tab\" \n  name=\"Active_Contour_Tab\" width=\"500\" height=\"400\"\u003e\n  \n  \u003cimg src=\"resources/UI/Harris_Tab.png\" alt=\"Harris_Tab\" \n  name=\"Harris_Tab\" width=\"500\" height=\"400\"\u003e\n  \n  \u003cimg src=\"resources/UI/SIFT_Tab.png\" alt=\"SIFT_Tab\" \n  name=\"SIFT_Tab\" width=\"500\" height=\"400\"\u003e\n  \n  \u003cimg src=\"resources/UI/Segmentation_Tab.png\" alt=\"Segmentation_Tab\" \n  name=\"Segmentation_Tab\" width=\"500\" height=\"400\"\u003e\n\u003c/details\u003e\n\n\u003cdiv style=\"page-break-after: always;\"\u003e\u003c/div\u003e\n\n\u003c!-- Task #1 Report --\u003e\n\n# \u003ca name=\"image-processing_h\"\u003eImage Processing\u003c/a\u003e\nIn this section we present some implementations such as adding noise to image, filtering the added noise, viewing different types of histograms, applying threshold to image and hybrid images.\n\n## 1. Adding Noise To Image\nWe implemented 3 types of noise: `Uniform`, `Gaussian` and `Salt \u0026 Pepper`. In each type, you could adjust some parameters such as **Signal-To-Noise Ratio (SNR)** and **Sigma** to show different outputs.\n\nThe results below were taken with the following setup:\n\n**Noise parameters:**\n- `SNR` = 0.6\n- `Sigma` = 128 (For Gaussian Noise Only)\n\nThe whole GUI is displayed to show you the difference between the original and the noisy image.\n\n### 1.1 Uniform Noise\n\u003cimg src=\"resources/results/image_processing/Noise_Uniform_1.png\" alt=\"Noise_Uniform_1\" width=\"600\" height=\"500\"\u003e\n\n### 1.2 Gaussian Noise\n\u003cimg src=\"resources/results/image_processing/Noise_Gaussian_1.png\" alt=\"Noise_Gaussian_1\" width=\"600\" height=\"500\"\u003e\n\n### 1.3 Salt \u0026 Pepper Noise\n\u003cimg src=\"resources/results/image_processing/Noise_Salt_and_Pepper_1.png\" alt=\"Noise_Salt_and_Pepper_1\" width=\"600\" height=\"500\"\u003e\n\nTo decrease amount of noise, move the SNR slider a little, and this would be the new output with `SNR = 0.9`, which means only 10% of the image is noise.\n\n\u003cimg src=\"resources/results/image_processing/Noise_Salt_and_Pepper_2.png\" alt=\"Noise_Salt_and_Pepper_2\" width=\"600\" height=\"500\"\u003e\n \n\n## 2. Image Filtering\nWe implemented 3 types of Filters: `Average`, `Gaussian`, and `Median` filter. In each filter, you could adjust some parameters such as **mask size** and **Sigma** to show different outputs.\n\nThe results below were taken with the following setup:\n\n**Noise parameters:**\n- `SNR` = 0.6\n- `Sigma` = 128 (For Gaussian Noise Only)\n\n**Filter Parameters:**\n- `Mask Size`: 5x5\n- `Sigma` = 128 (For Gaussian Filter Only)\n\nThe whole GUI is displayed to show you the difference between the noise and the filtered image.\n\n### 2.1 Average Filter Applied on Uniform Noise\n\u003cimg src=\"resources/results/image_processing/Filter_Average_On_Noise_Uniform_1.png\" alt=\"Filter_Average_On_Noise_Uniform_1\" width=\"600\" height=\"500\"\u003e\n\n### 2.2 Gaussian Filter Applied on Gaussian Noise\n\u003cimg src=\"resources/results/image_processing/Filter_Gaussian_On_Noise_Gaussian_1.png\" alt=\"Filter_Gaussian_On_Noise_Gaussian_1\" width=\"600\" height=\"500\"\u003e\n\n### 2.3 Median Filter Applied on Salt \u0026 Pepper Noise\n\u003cimg src=\"resources/results/image_processing/Filter_Median_On_Noise_Salt_And_Pepper_1.png\" alt=\"Filter_Median_On_Noise_Salt_And_Pepper_1\" width=\"600\" height=\"500\"\u003e\n\nTo increase the blurring effect, increase mask size, and this would be the new output with `mask size = 9x9`.\n\n\u003cimg src=\"resources/results/image_processing/Filter_Gaussian_On_Noise_Gaussian_2.png\" alt=\"Filter_Gaussian_On_Noise_Gaussian_2\" width=\"600\" height=\"500\"\u003e\n\n\n## 3. Edge Detection\nWe implemented 4 types of Edge Detection Techniques (Masks): `Prewitt`, `Sobel`, `Roberts` and `Canny`.\n\n### 3.1 Sobel Mask\n\u003cimg src=\"resources/results/image_processing/Edges_Sobel_Mask.png\" alt=\"Edges_Sobel_Mask\" \nwidth=\"600\" height=\"500\"\u003e\n\n### 3.2 Roberts Mask\n\u003cimg src=\"resources/results/image_processing/Edges_Roberts_Mask.png\" alt=\"Edges_Roberts_Mask\" \nwidth=\"600\" height=\"500\"\u003e\n\n### 3.3 Prewitt Mask\n\u003cimg src=\"resources/results/image_processing/Edges_Prweitt_Mask.png\" alt=\"Edges_Prweitt_Mask\" \nwidth=\"600\" height=\"500\"\u003e\n\n### 3.4 Canny Mask\nThe Canny edge detector is an edge detection operator that uses a multi-stage algorithm to detect a wide range of edges in images.\n\n\u003cimg src=\"resources/results/image_processing/Edges_Canny_Mask.png\" alt=\"Edges_Canny_Mask\" \nwidth=\"600\" height=\"500\"\u003e\n\n\n## 4. Image Histogram and Thresholding\nWe applied `Histogram Equalization and Normalization`, each algorithm is used for specific problem. In addition to `Convert RGB to Gray Image`. We also applied `Local and Global Thresholding` to differentiate between objects in the image and display specific area of interest. .\n\n### 4.1 Histogram Equalization\n\u003cimg src=\"resources/results/image_processing/Histogram_Equalization_1.png\" alt=\"Histogram_Equalization_1\"\nwidth=\"600\" height=\"500\"\u003e\n\n### 4.2 Histogram Normalization\n\u003cimg src=\"resources/results/image_processing/Histogram_Normalization_1.png\" alt=\"Histogram_Normalization_1\" \nwidth=\"600\" height=\"500\"\u003e\n\n### 4.3 RGB To Gray\n\u003cimg src=\"resources/results/image_processing/Histogram_RGB_To_Gray.png\" alt=\"Histogram_RGB_To_Gray\" \nwidth=\"600\" height=\"500\"\u003e\n\n### 4.4 Local Thresholding\n\u003cimg src=\"resources/results/image_processing/Thresholding_Local_1.png\" alt=\"Thresholding_Local_1\" \nwidth=\"600\" height=\"500\"\u003e\n\n### 4.5 Global Thresholding\n\u003cimg src=\"resources/results/image_processing/Thresholding_Global_1.png\" alt=\"Thresholding_Global_1\" \nwidth=\"600\" height=\"500\"\u003e\n\n\n## 5. Hybrid Images\nGiven 2 images, we apply a Low Pass Filter to the 1st image, and a High Pass Filters to the 2nd image, both in Frequency Domain, and mix the two images to see the output.\n\n### 5.1 Low Pass Filter With High Pass Filter\n\u003cimg src=\"resources/results/image_processing/Hybrid_Images_1.png\" alt=\"Hybrid_Images_1\" \nwidth=\"600\" height=\"500\"\u003e\n\nIf you zoomed in the image you would see more details from the dog, if you zoomed out the image you would see more details from the cat.\n\n\u003cdiv style=\"page-break-after: always;\"\u003e\u003c/div\u003e\n\n\n\u003c!-- Task #2 Report --\u003e\n\n# \u003ca name=\"boundary-detection_h\"\u003eBoundary Detection\u003c/a\u003e\nIn this section we present 2 algorithms implementations; `Hough Transformation` and Active Contour Model, aka `'Snake Algorithm'`.\n\n\n## 1. Hough Transformation\nThe Hough transform is a technique that locates shapes in images. In particular, it has been used to extract lines, circles and ellipses if you can represent that shape in mathematical form.\n\nThe results below were taken with the following setup:\n\n### 1.1 Line Detection\nThe `Votes` number is basically responsible for determining the amount of output lines. More votes means more detected lines, but this doesn't mean that **5** votes should equal **5** lines, it's not working in that way.\n\n\u003cimg src=\"resources/results/boundary_detection/Hough_Lines_1.png\" alt=\"Hough_Lines_1\" width=\"600\" height=\"500\"\u003e\n\n\u003cimg src=\"resources/results/boundary_detection/Hough_Lines_2.png\" alt=\"Hough_Lines_2\" width=\"600\" height=\"500\"\u003e\n\n\n### 1.2 Circle Detection\nHere there is an option to choose the range of radius you want to detect, minimum and maximum range.\n\n\u003cimg src=\"resources/results/boundary_detection/Hough_Circles_1.png\" alt=\"Hough_Circles_1\" width=\"600\" height=\"500\"\u003e\n\n\u003cimg src=\"resources/results/boundary_detection/Hough_Circles_2.png\" alt=\"Hough_Circles_2\" width=\"600\" height=\"500\"\u003e\n\nIn the 2nd image the maximum radius is less than the bigger circle, so it wasn't detected.\n\n\n\u003cdiv style=\"page-break-after: always;\"\u003e\u003c/div\u003e\n\n## 2. Active Contour Model\nActive contour is one of the active models in segmentation techniques, which makes use of the energy constraints and forces in the image for separation of region of interest.\n\nActive contour defines a separate boundary or curvature for the regions of target object for segmentation. This implementation is based on `Greedy Algorithm`.\n\n### 2.1 Result of applying Snake Model on a hand image\n\u003cimg src=\"resources/results/boundary_detection/Active_Contour_Snake_1.png\" alt=\"Active_Contour_Snake_1\" width=\"600\" height=\"500\"\u003e\n\nThe parameters' values of `alpha`, `beta`, `gamma` and `number of iterations` are selected by trial and error approach.\n\n### This GIF shows the process in a better way\n\u003cimg src=\"resources/results/boundary_detection/Active_Contour_Snake_1.gif\" alt=\"Active_Contour_Snake_1\" width=\"600\" height=\"500\"\u003e\n\n\u003cdiv style=\"page-break-after: always;\"\u003e\u003c/div\u003e\n\n\n### 2.2 Result of applying the algorithm on circles image\n\u003cimg src=\"resources/results/boundary_detection/Active_Contour_Snake_2.png\" alt=\"Active_Contour_Snake_2\" width=\"600\" height=\"500\"\u003e\n\n### This GIF shows the process in a better way\n\u003cimg src=\"resources/results/boundary_detection/Active_Contour_Snake_2.gif\" alt=\"Active_Contour_Snake_2\" width=\"600\" height=\"500\"\u003e\n\n\u003cdiv style=\"page-break-after: always;\"\u003e\u003c/div\u003e\n\n\n\u003c!-- Task #3 Report --\u003e\n\n# \u003ca name=\"features-detection-and-image-matching_h\"\u003eFeatures Detection and Image Matching\u003c/a\u003e\nIn this section we present 3 algorithms implementations; `Feature Extraction Using Harris Operator`, `Scale Invariant Features (SIFT)` and `Feature Matching`.\n\n\n## 1. Extract The Unique Features In All Images Using Harris Operator\n\nThere are mainly 2 parameters in Harris Detector:\n- `Threshold`: Value used computing local maxima (Higher threshold means less corners)\n- `Sensitivity`: Sensitivity factor to separate corners from edges. (Small values result in detection of sharp corners).\n\n### 1.1 Harris Corners with `0.2` Threshold and `0.01` Sensitivity\n\u003cimg src=\"resources/results/feature_matching/Harris_Corners_1.png\" alt=\"Harris_Corners_1\" width=\"600\" height=\"500\"\u003e\n\n### 1.2 Harris Corners with `0.1` Threshold and `0.02` Sensitivity\n\u003cimg src=\"resources/results/feature_matching/Harris_Corners_2.png\" alt=\"Harris_Corners_2\" width=\"600\" height=\"500\"\u003e\n\nThe processing time is barely noticeable, it only took about `0.01 second` to detect all the corners in the first image and `0.02 second` in the second image.\n\n\u003cdiv style=\"page-break-after: always;\"\u003e\u003c/div\u003e\n\n## 2. Feature Descriptors Using Scale Invariant Features (SIFT) Algorithm\nApplying SIFT Algorithm to generate features descriptors to use them in matching images with different techniques.\n\nIt is not necessary to show the output of SIFT algorithm, the final output is shown in the matching step.\n\n## 3. Matching the Image Set Features \nWe applied two Matching Algorithms, Sum Of Squared Differences `(SSD)` and Normalized Cross Correlations `(NCC)`.\n\n\n### 3.1 Feature Matching Using Sum of Squared Differences (SSD)\n\u003cimg src=\"resources/results/feature_matching/Feature_Matching_SSD.png\" alt=\"Feature_Matching_SSD\" width=\"600\" height=\"500\"\u003e\n\n### 3.2 Feature Matching Using Normalized Cross Correlations (NCC)\n\u003cimg src=\"resources/results/feature_matching/Feature_Matching_NCC.png\" alt=\"Feature_Matching_NCC\" width=\"600\" height=\"500\"\u003e\n\nThe computations in this algorithm are heavily and extreme, so as you see it took around `1 minute` to finish the whole process on a small image.\n\n#### Note:\nIn the above results, each SIFT Algorithm applied was running on a separate thread for faster and better experience, and to avoid GUI freezing problem.\n\n\n\n\u003cdiv style=\"page-break-after: always;\"\u003e\u003c/div\u003e\n\n\n\u003c!-- Task #4 Report --\u003e\n\n# \u003ca name=\"image-segmentation_h\"\u003eImage Segmentation\u003c/a\u003e\nIn this section we present some algorithms implementations for Image Segmentation; `Using Thresholding and Clustering Methods`.\n\n## 1. Segmentation Using Thresholding\nWe implemented 3 types of Thresholding, Local and Global for each threshold:\n- `Optimal Thresholding`\n- `Otsu Thresholding`\n- `Spectral Thresholding (More than 2 modes)`\n\nThere are mainly 1 parameter used in Local Thresholding:\n- `X-Regions`: indicates how many regions we want to divide in x-direction\n- `Y-Regions`: indicates how many regions we want to divide in y-direction\n\n### 1.1 Optimal Thresholding\n#### Using Global Thresholding\n\u003cimg src=\"resources/results/segmentation/Thresholding_Optimal_Global_1.png\" alt=\"Thresholding_Optimal_Global_1\" width=\"600\" height=\"500\"\u003e\n\n\u003cimg src=\"resources/results/segmentation/Thresholding_Optimal_Global_2.png\" alt=\"Thresholding_Optimal_Global_2\" width=\"600\" height=\"500\"\u003e\n\n#### Using Local Thresholding\n\u003cimg src=\"resources/results/segmentation/Thresholding_Optimal_Local_1.png\" alt=\"Thresholding_Optimal_Local_1\" width=\"600\" height=\"500\"\u003e\n\n\u003cimg src=\"resources/results/segmentation/Thresholding_Optimal_Local_2.png\" alt=\"Thresholding_Optimal_Local_2\" width=\"600\" height=\"500\"\u003e\n\n### 1.2 Otsu Thresholding\n#### Using Global Thresholding\n\u003cimg src=\"resources/results/segmentation/Thresholding_Otsu_Global_1.png\" alt=\"Thresholding_Otsu_Global_1\" width=\"600\" height=\"500\"\u003e\n\n\u003cimg src=\"resources/results/segmentation/Thresholding_Otsu_Global_2.png\" alt=\"Thresholding_Otsu_Global_2\" width=\"600\" height=\"500\"\u003e\n\n**Note**: There is some noise in the image which affects the output a little.\n\n#### Using Local Thresholding\n\u003cimg src=\"resources/results/segmentation/Thresholding_Otsu_Local_1.png\" alt=\"Thresholding_Otsu_Local_1\" width=\"600\" height=\"500\"\u003e\n\n### 1.3 Spectral Thresholding\n#### Using Global Thresholding\n\u003cimg src=\"resources/results/segmentation/Thresholding_Spectral_Global_1.png\" alt=\"Thresholding_Spectral_Global_1\" width=\"600\" height=\"500\"\u003e\n\n\u003cimg src=\"resources/results/segmentation/Thresholding_Spectral_Global_2.png\" alt=\"Thresholding_Spectral_Global_2\" width=\"600\" height=\"500\"\u003e\n\n#### Using Local Thresholding\n\u003cimg src=\"resources/results/segmentation/Thresholding_Spectral_Local_1.png\" alt=\"Thresholding_Spectral_Local_1\" width=\"600\" height=\"500\"\u003e\n\n## 2. Segmentation Using Clustering\nWe implemented 4 Clustering methods:\n- `K-Means`\n- `Region Growing`\n- `Agglomerative Clustering`\n- `Mean-Shift`\n\nThere are mainly 2 parameters in some Clustering methods:\n- `Number of Clusters`: to specify how many clusters you need in the output image.\n- `Threshold`: to threshold the output image in specif level in some methods.\n\n\n### 2.1 K-Means with `6` Clusters\n\u003cimg src=\"resources/results/segmentation/Clustering_K_Means_1.png\" alt=\"Clustering_K_Means_1\" width=\"600\" height=\"500\"\u003e\n\n### 2.2 Region Growing with `3` Clusters\n\u003cimg src=\"resources/results/segmentation/Clustering_Region_Growing_1.png\" alt=\"Clustering_Region_Growing_1.png\" width=\"600\" height=\"500\"\u003e\n\n\n### 2.3 Agglomerative Clustering with `10` Clusters\n\u003cimg src=\"resources/results/segmentation/Clustering_Agglomerative_1.png\" alt=\"Clustering_Agglomerative_1.png\" width=\"600\" height=\"500\"\u003e\n\n### 2.4 Mean-Shift with `30` Threshold\n\u003cimg src=\"resources/results/segmentation/Clustering_Mean_Shift_1.png\" alt=\"Clustering_Mean_Shift_1.png\" width=\"600\" height=\"500\"\u003e\n\n### Mean-Shift with `90` Threshold\n\u003cimg src=\"resources/results/segmentation/Clustering_Mean_Shift_2.png\" alt=\"Clustering_Mean_Shift_2.png\" width=\"600\" height=\"500\"\u003e\n\nThe output image is changed whenever you change the threshold. You could choose the desired threshold by trial and error to know what value fits.\n\n\u003cdiv style=\"page-break-after: always;\"\u003e\u003c/div\u003e\n\n\n\u003c!-- Task #5 Report --\u003e\n\n# \u003ca name=\"face-detection-and-recognition_h\"\u003eFace Detection and Recognition\u003c/a\u003e\nIn this section we present Face Detection and Recognition implementations; `Using PCA/Eigenfaces Analysis`.\n\n## 1. Face Detection\nThis is implemented using openCV library, using `CascadeClassifier` which contains OpenCV data used to detect objects.\n\nThere are mainly 2 parameter you can adjust in Face Detection:\n- `Scale Factor`: Since some faces may be closer to the camera, they would appear bigger than the faces in the back. The scale factor compensates for this.\n- `Minimum Window Size`: size of each moving window that that algorithm to detect objects.\n\n\n### Face Detection of one person\n\u003cimg src=\"resources/results/face_detection_and_recognition/Face_Detection_1.png\" alt=\"Face_Detection_1\" width=\"600\" height=\"500\"\u003e\n\n\u003cimg src=\"resources/results/face_detection_and_recognition/Face_Detection_3.png\" alt=\"Face_Detection_3\" width=\"600\" height=\"500\"\u003e\n\n#### Face Detection of our team\n\u003cimg src=\"resources/results/face_detection_and_recognition/Face_Detection_2.png\" alt=\"Face_Detection_3\" width=\"600\" height=\"500\"\u003e\n\n\n## 2. Face Recognition\nThis implementation is based on `PCA/Eigenfaces Analysis`, it's implemented from scratch with the help of some useful libraries.\n\n### Quick Description\n- First you need to load the training dataset which consists of 40 class (folder), each class represents one person. Each class has 10 images, taken in different positions.\n- Create Eigen-faces matrix for the dataset, which will be used later to compare with any new test image.\n- Load your test image then start the matching (recognition) process.\n- This function runs in a separate QThreads to ensure best quality and prevent GUI from freezing as it may take some seconds to finish. \n\n### Face Recognition with correct test\n\u003cimg src=\"resources/results/face_detection_and_recognition/Face_Recognition_1.png\" alt=\"Face_Recognition_1\" width=\"600\" height=\"500\"\u003e\n\n\u003cimg src=\"resources/results/face_detection_and_recognition/Face_Recognition_2.png\" alt=\"Face_Recognition_2\" width=\"600\" height=\"500\"\u003e\n\nThe output image `Best Match`, is just a combination of all the class images in the database, just for displaying purposes to make it clear to the user.\n\n#### Face Recognition with wrong test\n\u003cimg src=\"resources/results/face_detection_and_recognition/Face_Recognition_3.png\" alt=\"Face_Recognition_3\" width=\"600\" height=\"500\"\u003e\n\n\u003cdiv style=\"page-break-after: always;\"\u003e\u003c/div\u003e\n\n\nThis repository is created by a group of 4 students in Biomedical Engineering Department, Cairo University. :copyright:\n\n\n| Name                    | Section | B.N Number   |\n|-------------------------|---------|--------------|\n| Ahmed Salah El-Dein     | 1       |            5 |\n| Ahmad Abdelmageed Ahmad | 1       |            8 |\n| Ahmad Mahdy Mohammed    | 1       |            9 |\n| Abdullah Mohammed Sabry | 2       |            7 |","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabdullah-alrefaey%2Fcomputer-vision-tasks","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fabdullah-alrefaey%2Fcomputer-vision-tasks","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabdullah-alrefaey%2Fcomputer-vision-tasks/lists"}