{"id":24770770,"url":"https://github.com/okamyuji/go-image-processor","last_synced_at":"2025-03-23T20:25:11.551Z","repository":{"id":273152835,"uuid":"918840546","full_name":"okamyuji/go-image-processor","owner":"okamyuji","description":"A command-line and GUI tool for image processing operations in Go, featuring resize, denoise, rotate, binarize, concatenate, and edge detection capabilities.","archived":false,"fork":false,"pushed_at":"2025-01-19T05:33:11.000Z","size":134,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-29T03:56:19.484Z","etag":null,"topics":["cli-app","go","gui","image-filters","image-manipulation","image-processing","image-resize","image-rotation","jpeg"],"latest_commit_sha":null,"homepage":"","language":"Go","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/okamyuji.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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-19T01:51:44.000Z","updated_at":"2025-01-19T05:33:12.000Z","dependencies_parsed_at":"2025-01-19T02:31:22.159Z","dependency_job_id":"c71fa2e5-82ce-43e8-a5cb-cbef97d94518","html_url":"https://github.com/okamyuji/go-image-processor","commit_stats":null,"previous_names":["okamyuji/go-image-processor"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/okamyuji%2Fgo-image-processor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/okamyuji%2Fgo-image-processor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/okamyuji%2Fgo-image-processor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/okamyuji%2Fgo-image-processor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/okamyuji","download_url":"https://codeload.github.com/okamyuji/go-image-processor/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245163720,"owners_count":20570984,"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":["cli-app","go","gui","image-filters","image-manipulation","image-processing","image-resize","image-rotation","jpeg"],"created_at":"2025-01-29T03:56:28.265Z","updated_at":"2025-03-23T20:25:11.507Z","avatar_url":"https://github.com/okamyuji.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Go Image Processor\n\nGo Image Processor is a command-line tool for performing various image processing operations on JPEG images.\n\n## Features\n\n- Resize images\n- Denoise images\n- Rotate images\n- Binarize images using Otsu's method\n- Concatenate images vertically or horizontally\n- Generate test images\n- Detect edges using Sobel operator\n- Configuration file for default settings\n- Graphical User Interface for easier use\n\n## Installation\n\n1. Ensure you have Go installed on your system (version 1.16 or later).\n2. Clone this repository\n\n    ```shell\n    git clone https://github.com/okamyuji/go-image-processor.git\n    ```\n\n3. Navigate to the project directory\n\n    ```shell\n    cd go-image-processor\n    ```\n\n4. Build the project\n\n    ```shell\n    make all\n    ```\n\n## Usage\n\n### Command Line Interface\n\nThe general syntax for using the CLI tool is:\n\n```shell\n./go-image-processor \u003ccommand\u003e [arguments]\n```\n\n### Graphical User Interface\n\nA simple graphical user interface (GUI) is available for easier use of the image processing tool. To build and run the GUI:\n\n```shell\nmake build-gui\nmake run-gui\n```\n\nThe GUI provides a user-friendly interface for selecting operations, inputting file paths, and setting parameters for image processing tasks.\n\n### Available commands\n\n1. Resize an image\n\n    ```shell\n    ./go-image-processor resize \u003cinput\u003e \u003coutput\u003e -width \u003cwidth\u003e -height \u003cheight\u003e\n    ```\n\n2. Denoise an image\n\n    ```shell\n    ./go-image-processor denoise \u003cinput\u003e \u003coutput\u003e\n    ```\n\n3. Rotate an image\n\n    ```shell\n    ./go-image-processor rotate \u003cinput\u003e \u003coutput\u003e -angle \u003cangle\u003e\n    ```\n\n4. Binarize an image\n\n    ```shell\n    ./go-image-processor binarize \u003cinput\u003e \u003coutput\u003e\n    ```\n\n5. Concatenate images vertically\n\n    ```shell\n    ./go-image-processor concatvert \u003coutput\u003e \u003cinput1\u003e \u003cinput2\u003e [input3...]\n    ```\n\n6. Concatenate images horizontally\n\n    ```shell\n    ./go-image-processor concathorz \u003coutput\u003e \u003cinput1\u003e \u003cinput2\u003e [input3...]\n    ```\n\n7. Generate a test image\n\n    ```shell\n    ./go-image-processor generatetest \u003coutput\u003e -width \u003cwidth\u003e -height \u003cheight\u003e\n    ```\n\n8. Detect edges in an image:\n\n    ```shell\n    ./go-image-processor edges \u003cinput\u003e \u003coutput\u003e\n    ```\n\nFor more information about a specific command, use\n\n```shell\n./go-image-processor \u003ccommand\u003e -h\n```\n\n## Examples\n\n1. Resize an image to 800x600:\n\n    ```shell\n    ./go-image-processor resize input.jpg output.jpg -width 800 -height 600\n    ```\n\n2. Rotate an image by 90 degrees:\n\n    ```shell\n    ./go-image-processor rotate input.jpg output.jpg -angle 90\n    ```\n\n3. Concatenate three images vertically:\n\n    ```shell\n    ./go-image-processor concatvert output.jpg input1.jpg input2.jpg input3.jpg\n    ```\n\n4. Detect edges in an image:\n\n    ```shell\n    ./go-image-processor edges input.jpg output_edges.jpg\n    ```\n\n## Configuration\n\nThe application uses a `config.yaml` file for default settings. You can modify this file to change the default values for various operations. The configuration file should be placed in the root directory of the project.\n\nExample `config.yaml`:\n\n```yaml\ndefault_width: 800\ndefault_height: 600\ndefault_angle: 90\njpeg_quality: 75\n```\n\nIf the configuration file is not found, the application will use built-in default values.\n\n## Quick Start with Makefile\n\nThis project includes a Makefile for easy building, testing, and running example commands.\n\n1. Build the project\n\n    ```shell\n    make build\n    ```\n\n2. Run tests:\n\n    ```shell\n    make test\n    ```\n\n3. Clean build artifacts\n\n    ```shell\n    make clean\n    ```\n\n4. Run example commands:\n\n    ```shell\n    make resize-example\n    make denoise-example\n    make rotate-example\n    make binarize-example\n    make concatvert-example\n    make concathorz-example\n    make generatetest-example\n    ```\n\n5. Run benchmarks:\n\n```shell\nmake benchmark\n```\n\nThese commands will process the example images in the `examples` directory.\n\n## Continuous Integration\n\nThis project uses GitHub Actions for continuous integration. On every push and pull request to the main branch, the project is built and all tests are run automatically.\n\n## Benchmarks\n\nTo run benchmarks for the image processing functions, use\n\n```shell\nmake benchmark\n```\n\nThis will run performance tests on all the main functions, giving you an idea of their execution time and efficiency.\n\n## Documentation\n\nThe code is documented using godoc. To view the documentation, run\n\n```shell\ngodoc -http=:6060\n```\n\nThen open your browser and navigate to `http://localhost:6060/pkg/github.com/okamyuji/go-image-processor/pkg/processor/`\n\n## Logging\n\nThe application uses Go's built-in logging package to log information about the operations being performed. Logs are printed to stderr by default.\n\nTo redirect logs to a file, you can run the application like this:\n\n```shell\n./go-image-processor \u003ccommand\u003e [arguments] 2\u003e logfile.txt\n```\n\nThis will send all log output to `logfile.txt`.\n\n## How Each Image Processing Feature Works\n\n### Resize Image\n\nHave you ever needed to make a photo smaller or bigger? That's what our resize feature does!\n\n1. It takes your original image\n2. Keeps the same shape (like a rectangle stays a rectangle)\n3. Makes it bigger or smaller while keeping everything looking natural\n4. Saves the new sized image\n\nExample: Making a large 1000x1000 photo smaller to fit on your screen at 500x500.\n\n### Denoise Image (Remove Noise)\n\nThink of noise as tiny unwanted dots in your photo, like static on an old TV.\n\n1. The program looks at each part of the image\n2. For each spot, it checks the colors around it\n3. If it finds a dot that looks out of place, it smooths it out\n4. The result is a cleaner, clearer image\n\nExample: Making a grainy dark photo look smoother and clearer.\n\n### Rotate Image\n\nJust like turning a photo in your hands, this feature rotates your image.\n\n1. You tell it how many degrees to turn (like 90° for a quarter turn)\n2. It carefully moves each part of the image to its new position\n3. Makes sure nothing gets cut off\n4. Saves the turned image\n\nExample: Turning a sideways photo to make it upright.\n\n### Binarize Image (Black and White Conversion)\n\nThis turns your image into just black and white - no gray areas!\n\n1. Looks at how bright each part of the image is\n2. Decides if each spot should be black or white\n3. Uses a smart method (called Otsu) to make the best choice\n4. Creates a clear black and white version\n\nExample: Making a color photo look like an old newspaper picture.\n\n### Concatenate Images\n\nThis feature can join images together like puzzle pieces!\n\nVertical Concatenation:\n\n1. Takes two or more images\n2. Stacks them on top of each other\n3. Makes sure they line up perfectly\n4. Creates one tall image\n\nHorizontal Concatenation:\n\n1. Takes two or more images\n2. Places them side by side\n3. Lines them up evenly\n4. Creates one wide image\n\nExample: Joining two holiday photos to make a panorama.\n\n### Edge Detection\n\nThis feature finds and highlights the outlines in your image!\n\n1. Looks for places where colors change suddenly\n2. Marks these changes as edges\n3. Makes the edges stand out\n4. Creates an image showing just the outlines\n\nExample: Making a sketch-like version of a photo, showing just the main shapes.\n\n### Auto-rotate Image (Skew Correction)\n\nThis feature automatically detects and corrects tilted images!\n\n1. Analyzes the image to find strong lines or text\n2. Calculates how much the image is tilted\n3. Rotates the image to make it straight\n4. Saves the corrected image\n\nExample: Fixing a scanned document that was placed slightly crooked.\n\n### Test Image Generation\n\nNeed sample images to practice with? This feature creates them!\n\n1. Makes different types of test images\n2. Creates patterns that are perfect for testing\n3. Lets you choose the size\n4. Saves them as regular image files\n\nExample: Creating a checkerboard pattern to test image processing.\n\n---\nRemember: All these features keep your original image safe and create new files with the changes. It's like having a photo copy machine that can do magic tricks with your pictures! 🪄📸\n\n## Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fokamyuji%2Fgo-image-processor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fokamyuji%2Fgo-image-processor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fokamyuji%2Fgo-image-processor/lists"}