{"id":19226009,"url":"https://github.com/developer239/simple-color-batch-cropper","last_synced_at":"2025-02-23T10:19:06.924Z","repository":{"id":97424801,"uuid":"116513516","full_name":"developer239/simple-color-batch-cropper","owner":"developer239","description":"Automatically crops positive/negative samples for your haar cascades. Example uses images from Swords and Souls web game. You can also use this library to mark your images.","archived":false,"fork":false,"pushed_at":"2018-02-04T17:47:27.000Z","size":2917,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-04T21:41:42.835Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/developer239.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":"2018-01-06T20:30:51.000Z","updated_at":"2018-01-07T19:16:40.000Z","dependencies_parsed_at":null,"dependency_job_id":"f72ff036-6a32-4bfc-9a32-c0000c5d826a","html_url":"https://github.com/developer239/simple-color-batch-cropper","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/developer239%2Fsimple-color-batch-cropper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/developer239%2Fsimple-color-batch-cropper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/developer239%2Fsimple-color-batch-cropper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/developer239%2Fsimple-color-batch-cropper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/developer239","download_url":"https://codeload.github.com/developer239/simple-color-batch-cropper/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240298975,"owners_count":19779378,"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":[],"created_at":"2024-11-09T15:17:02.774Z","updated_at":"2025-02-23T10:19:06.908Z","avatar_url":"https://github.com/developer239.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Simple Color Batch cropper\n\n### Installation\n```\n$ yarn install\n```\n\nMake sure to have OpenCV 3+ (extra modules are optional) installed on your system https://github.com/opencv/opencv/releases/.\n\nMore information can be found here: [opencv4nodejs](https://github.com/justadudewhohacks/opencv4nodejs#how-to-install)\n\n### What does it do\n\n#### Positive images\n\n1) When you need to generate large amount of positive samples of all _shooting targets_ automatically\n![1](https://github.com/developer239/simple-color-batch-cropper/blob/master/documentation/images/1.png?raw=true)\n2) This script will generate binary image\n![2](https://github.com/developer239/simple-color-batch-cropper/blob/master/documentation/images/2.png?raw=true)\n3) Then it will find all shooting targets for you\n![3](https://github.com/developer239/simple-color-batch-cropper/blob/master/documentation/images/3.png?raw=true)\n4) Then it will draw bounding box around all targets\n![4](https://github.com/developer239/simple-color-batch-cropper/blob/master/documentation/images/4.png?raw=true)\n\n#### Negative images\n\n`src/negative.js` will crop random locations from the original image so that none of the locations contain matches that you found using the `src/positive.js` file. This is useful when you want to generate large number of negative samples.\n\n### How to use\n\n* Put image that you want to process in `src/images` folder\n* Create config variables in `src/config` folder. Every obect that you want to crop has its own config file. For example config for cropping apples: \n```\nexport const UPPER_COLOR = new Vec(200, 65, 255) // Upper color range !! IMPORTANT\nexport const LOWER_COLOR = new Vec(10, 10, 130) // Lower color range !! IMPORTANT\nexport const BLUR = 5 // Necessary for removing noise from image !! IMPORTANT\nexport const OFFSET = -50 // Top/left for positive image preview\nexport const REGION_SIZE = 100 // Positive image preview size\nexport const PATH = './src/images/withAppleSmall.jpg' // Path to image that will be parsed\n```\n\n* Import correct config in `src/positive.js` and `src/negative.js` files\n* Run either `yarn positive` or `yarn negative` in order to see the result\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeveloper239%2Fsimple-color-batch-cropper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdeveloper239%2Fsimple-color-batch-cropper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeveloper239%2Fsimple-color-batch-cropper/lists"}