{"id":32494379,"url":"https://github.com/premchandyadav369/dip_lab","last_synced_at":"2026-05-16T17:04:32.174Z","repository":{"id":320353627,"uuid":"1081766054","full_name":"Premchandyadav369/DIP_LAB","owner":"Premchandyadav369","description":"Digital Image Processing Lab Experiments","archived":false,"fork":false,"pushed_at":"2025-10-23T09:23:00.000Z","size":40,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-10-23T11:08:21.324Z","etag":null,"topics":["image-processing","opencv","opencv-python","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Premchandyadav369.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-10-23T08:58:24.000Z","updated_at":"2025-10-23T09:23:04.000Z","dependencies_parsed_at":"2025-10-23T11:08:23.342Z","dependency_job_id":"20d485bf-bacc-4ff5-adfa-8324d1a0d494","html_url":"https://github.com/Premchandyadav369/DIP_LAB","commit_stats":null,"previous_names":["premchandyadav369/dip_lab"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/Premchandyadav369/DIP_LAB","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Premchandyadav369%2FDIP_LAB","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Premchandyadav369%2FDIP_LAB/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Premchandyadav369%2FDIP_LAB/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Premchandyadav369%2FDIP_LAB/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Premchandyadav369","download_url":"https://codeload.github.com/Premchandyadav369/DIP_LAB/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Premchandyadav369%2FDIP_LAB/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33111497,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-16T04:41:52.686Z","status":"ssl_error","status_checked_at":"2026-05-16T04:41:52.009Z","response_time":115,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["image-processing","opencv","opencv-python","python"],"created_at":"2025-10-27T13:00:44.588Z","updated_at":"2026-05-16T17:04:32.169Z","avatar_url":"https://github.com/Premchandyadav369.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# DIP Lab Experiments\n\nThis repository contains a series of Python scripts for Digital Image Processing (DIP) experiments. Each script explores fundamental concepts and techniques in image processing.\n\n**Done by: V C Premchand Yadav**\n\n---\n\n## Getting Started\n\n### Prerequisites\n\nMake sure you have Python 3.6+ installed.\n\n### Installation\n\n1.  Clone the repository:\n    ```sh\n    git clone \u003crepository-url\u003e\n    ```\n2.  Navigate to the project directory:\n    ```sh\n    cd \u003crepository-directory\u003e\n    ```\n3.  Install the required dependencies:\n    ```sh\n    pip install -r requirements.txt\n    ```\n\n### Running the Scripts\n\nEach script is a standalone command-line tool. To run a script, use the following format:\n\n```sh\npython \u003cscript_name.py\u003e \u003cpath_to_your_image\u003e [options]\n```\n\nFor example, to run the Image Negative transformation from `Lab2.py` on an image located in the `images` folder, you would use:\n\n```sh\npython Lab2.py images/sample.jpg\n```\n\nEach script has its own set of options. To see the available options for a specific script, use the `-h` or `--help` flag:\n\n```sh\npython \u003cscript_name.py\u003e -h\n```\n\n---\n\n## Lab 2: Image Enhancement in the Spatial Domain\n\nThis script focuses on point processing techniques for image enhancement.\n\n### Techniques Used:\n- **Image Negative:** Inverts the intensity levels of an image.\n- **Log Transformation:** Compresses the dynamic range of an image, enhancing details in darker regions.\n- **Gamma (Power-law) Transformation:** Adjusts the brightness and contrast of an image.\n- **Piecewise Linear Transformation:** Applies a linear transformation in a piecewise manner to enhance specific intensity ranges.\n- **Bit-plane Slicing:** Separates the image into its 8 bit-planes to show the contribution of each bit to the final image.\n\n---\n\n## Lab 3: Spatial Filtering and Histogram Equalization\n\nThis script demonstrates histogram equalization and various spatial filtering techniques for smoothing and sharpening.\n\n### Techniques Used:\n- **Histogram Equalization:** Improves contrast by redistributing pixel intensities.\n- **Smoothing Filters:**\n  - **Mean Filter:** Averages pixel values in a neighborhood.\n  - **Weighted (Gaussian) Filter:** Applies a weighted average, giving more importance to central pixels.\n  - **Median Filter:** Replaces each pixel with the median of its neighbors, effective for salt-and-pepper noise.\n  - **Mode, Max \u0026 Min Filters:** Use the mode, maximum, or minimum value in the neighborhood.\n- **Sharpening Filters:**\n  - **Sobel \u0026 Prewitt Filters:** First-order derivative filters for edge detection.\n  - **Laplacian Filter:** A second-order derivative filter for edge detection.\n\n---\n\n## Lab 4: Image Transforms\n\nThis lab explores two fundamental image transforms: the Karhunen-Loève (KL) Transform and the Discrete Cosine Transform (DCT).\n\n### `Lab4.1.py`\nDemonstrates the KL Transform (also known as Hotelling Transform or PCA) and DCT on a sample matrix.\n\n### `Lab4.py`\nApplies the KL Transform and DCT to a grayscale image and reconstructs it to show the effect of these transforms.\n\n---\n\n## Lab 5: Image Filtering in the Frequency Domain\n\nThis lab focuses on filtering techniques in the frequency domain.\n\n### `Lab5.py`\nImplements Ideal, Butterworth, and Gaussian filters for both lowpass and highpass filtering on color images.\n\n### `Lab5Application.py`\nApplies Butterworth lowpass and highpass filters to a grayscale image to demonstrate noise reduction and detail enhancement.\n\n---\n\n## Lab 6: Image Restoration and Denoising\n\nThis lab explores various techniques for image restoration from degradation.\n\n### `Lab6.py`\nImplements a wide range of spatial filters for noise reduction on both grayscale and color images, including:\n- Arithmetic and Geometric Mean Filters\n- Contraharmonic and Alpha-Trimmed Mean Filters\n- Min, Max, Median, and Midpoint Filters\n\n### `Lab6Application.py`\nDemonstrates advanced image restoration techniques like the Wiener filter, Tikhonov regularization, and Lucy-Richardson deconvolution.\n\n---\n\n## Lab 7: Advanced Image Restoration Filters\n\nThis lab implements and visualizes several advanced filters for restoring degraded images.\n\n### `Lab7.py`\nApplies Inverse, Pseudo-Inverse, Wiener, and Constrained Least Squares (CLS) filters to a color image with simulated motion blur and noise.\n\n### `Lab7Grayscale.py`\nProcesses each color channel of an image separately with the same set of restoration filters and visualizes the results with histograms.\n\n### `Lab7Matrix.py`\nDemonstrates the effect of these restoration filters on a sample matrix, providing a numerical view of their behavior.\n\n---\n\n## Lab 8: Image Degradation, Restoration, and Quality Metrics\n\nThis script simulates various image degradations, applies a denoising algorithm, and evaluates the results using objective quality metrics.\n\n### Degradations Simulated:\n- Gaussian Noise, Fog, Snow, Rain\n- Demotion (downscaling and upscaling)\n- Deblur (motion blur)\n\n### Metrics Used:\n- **MSE (Mean Squared Error):** Measures the average squared difference between the estimated and original images.\n- **PSNR (Peak Signal-to-Noise Ratio):** Measures the ratio between the maximum possible power of a signal and the power of corrupting noise.\n- **SSIM (Structural Similarity Index):** Measures the similarity between two images.\n\n---\n\n## Lab 9: Image Compression\n\nThis script compares the performance of DCT (Discrete Cosine Transform) and DST (Discrete Sine Transform) for image compression at various compression ratios.\n\n### Process:\n1. The input image is transformed using both DCT and DST.\n2. A certain percentage of the transform coefficients (from the top-left) are kept, and the rest are discarded.\n3. The image is reconstructed from the remaining coefficients.\n4. The compressed image sizes are compared and displayed in a summary table.\n\n---\n\n## Lab 10: Image Segmentation\n\nThis script demonstrates image segmentation using Otsu's thresholding method.\n\n### Process:\n1. The input image is converted to grayscale.\n2. Otsu's method is applied to automatically determine the optimal threshold value to separate the foreground from the background.\n3. The resulting binary image is displayed.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpremchandyadav369%2Fdip_lab","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpremchandyadav369%2Fdip_lab","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpremchandyadav369%2Fdip_lab/lists"}