{"id":24117067,"url":"https://github.com/cai991108/image-processing-and-computer-vision","last_synced_at":"2025-10-08T19:18:37.697Z","repository":{"id":270943259,"uuid":"911921553","full_name":"CAI991108/Image-Processing-and-Computer-Vision","owner":"CAI991108","description":"This repository contains code and implementations for tasks related to image processing and computer vision. Each task is organized in separate folders with detailed scripts and results.","archived":false,"fork":false,"pushed_at":"2025-01-04T08:01:52.000Z","size":46132,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-28T19:19:55.610Z","etag":null,"topics":["affine-transformation","disparity-map","gaussian-filter","histogram-equalization","portrait-segmentation","projection-matrix"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/CAI991108.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2025-01-04T07:38:54.000Z","updated_at":"2025-01-04T08:01:54.000Z","dependencies_parsed_at":"2025-01-04T09:16:28.140Z","dependency_job_id":null,"html_url":"https://github.com/CAI991108/Image-Processing-and-Computer-Vision","commit_stats":null,"previous_names":["cai991108/image-processing-and-computer-vision"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/CAI991108/Image-Processing-and-Computer-Vision","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CAI991108%2FImage-Processing-and-Computer-Vision","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CAI991108%2FImage-Processing-and-Computer-Vision/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CAI991108%2FImage-Processing-and-Computer-Vision/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CAI991108%2FImage-Processing-and-Computer-Vision/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CAI991108","download_url":"https://codeload.github.com/CAI991108/Image-Processing-and-Computer-Vision/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CAI991108%2FImage-Processing-and-Computer-Vision/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279000702,"owners_count":26082805,"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","status":"online","status_checked_at":"2025-10-08T02:00:06.501Z","response_time":56,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["affine-transformation","disparity-map","gaussian-filter","histogram-equalization","portrait-segmentation","projection-matrix"],"created_at":"2025-01-11T07:38:14.114Z","updated_at":"2025-10-08T19:18:37.675Z","avatar_url":"https://github.com/CAI991108.png","language":"Jupyter Notebook","readme":"\n# Image Processing and Computer Vision -- Python\n\nThis repository contains the code and implementation details for the \n**Image Processing and Computer Vision** consisting:\n\n1. **Image Affine Transformation**\n2. **Project 3D Points to Retina Plane**\n3. **PortraitNet Segmentation Model**\n4. **Gaussian Filter**\n5. **Local Histogram Equalization**\n6. **Disparity Estimation**\n\n## Repository Structure\n\n```\n.\n├── Image Affine Transformation/ \n│   ├── affine_transform.py    \n├── Project 3D Points to Retina Plane/ \n│   └── perspective_projection.ipynb  \n├── PortritNet Segmentation Model/ \n├── Gaussian Filter/\n│   └── gaussian_filter.py \n├── Local Histogram Equalization/\n│   └── local_hist_eq.py\n├── Disparity Estimation/\n├── reports/\n└── README.md           # This file\n```\n\n### Image Affine Transformation\n\nThis task involves implementing an affine transformation on an image. \nThe affine transformation includes scaling, rotation, and translation. \nThe transformation is applied to the image using both a custom implementation and \nOpenCV's `cv2.getRotationMatrix2D()` function.\n\n- **Affine Transformation Matrix**: The transformation matrix is constructed \nusing scaling factors, rotation angle, and translation distances.\n- **OpenCV Implementation**: The `cv2.getRotationMatrix2D()` function is used for comparison.\n\n### Project 3D Points to Retina Plane\n\nThis task involves projecting 3D points onto a 2D image plane using the pinhole camera model. \nThe camera's intrinsic and extrinsic parameters are used to perform the perspective projection.\n\n- **Camera Intrinsic Matrix**: Generated using focal lengths and principal point.\n- **Perspective Projection**: The 3D points are projected onto the 2D image plane \nusing the camera's intrinsic and extrinsic parameters.\n\n### PortraitNet Segmentation Model\n\nPortraitNet is a real-time segmentation model based on a lightweight U-shape architecture. \nThe model is trained on the EG1800 dataset and evaluated using the Intersection over Union (IoU) metric.\n\n- **Encoder-Decoder Architecture**: The encoder uses MobileNet-v2 as the backbone network, \nand the decoder consists of refined residual blocks and up-sampling layers.\n- **Loss Function**: Focal Loss is used to address class imbalance issues.\n- **Evaluation Metrics**: IoU is used to evaluate the model's segmentation accuracy.\n\n\n**Requirements**\n\n- Python 3.x, OpenCV, NumPy, PyTorch, TensorBoard (for training visualization)\n\nInstall the required dependencies:\n   ```bash\n   pip install -r requirements.txt\n   ```\n\n### Gaussian Filter\n\nThis task involves implementing a Gaussian filter to blur an image. \nThe Gaussian filter is applied using a kernel of size \\(k \\times k\\), \nwhere \\(k\\) is the kernel size and \\(\\sigma\\) is the standard deviation of the Gaussian distribution.\n\n- **Gaussian Kernel**: The kernel is calculated using the Gaussian function \nand normalized by dividing by the sum of all elements in the kernel.\n- **Edge Handling**: The image is padded with zeros before applying the filter to handle edge pixels.\n\n### Local Histogram Equalization\n\nThis task involves implementing local histogram equalization to enhance the contrast of an image. \nLocal histogram equalization is particularly effective for images with varying lighting conditions.\n\n- **Histogram Equalization**: The contrast of the image is adjusted locally by\nequalizing the histogram of small regions in the image.\n- **Limitations**: Local histogram equalization may over-enhance noise in low-contrast regions \nand has higher computational complexity compared to global histogram equalization.\n\n### Disparity Estimation\n\nThis task involves estimating the disparity map from stereo image pairs using both a block matching algorithm \nand a Siamese Neural Network.\n\n- **Block Matching Algorithm**: The Sum of Absolute Differences (SAD) is used as a similarity measure \nto compute the disparity map.\n- **Siamese Neural Network**: A neural network is trained to estimate the disparity map, \nproviding smoother and less noisy results compared to the block matching algorithm.\n\n**Requirements**\n\n- Python 3.x , OpenCV, NumPy, PyTorch (for Siamese Neural Network), Matplotlib (for visualization)\n\nInstall the required dependencies:\n   ```bash\n   pip install -r requirements.txt\n   ```\n\n\n## References\n\n- [PortraitNet GitHub Repository](https://github.com/dong-x16/PortraitNet)\n- [OpenCV Documentation](https://docs.opencv.org/)\n- [PyTorch Documentation](https://pytorch.org/docs/stable/index.html)\n- [Matplotlib Documentation](https://matplotlib.org/stable/contents.html)\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcai991108%2Fimage-processing-and-computer-vision","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcai991108%2Fimage-processing-and-computer-vision","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcai991108%2Fimage-processing-and-computer-vision/lists"}