{"id":18552993,"url":"https://github.com/raikel/mcrops","last_synced_at":"2026-04-30T10:02:28.824Z","repository":{"id":57440367,"uuid":"219391370","full_name":"raikel/mcrops","owner":"raikel","description":"A small library for processing images of agricultural fields.","archived":false,"fork":false,"pushed_at":"2019-11-13T16:25:54.000Z","size":623,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-15T11:32:11.303Z","etag":null,"topics":["agriculture","image-processing","opencv","python"],"latest_commit_sha":null,"homepage":"","language":"Python","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/raikel.png","metadata":{"files":{"readme":"README.rst","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}},"created_at":"2019-11-04T01:19:28.000Z","updated_at":"2024-07-18T18:08:56.000Z","dependencies_parsed_at":"2022-09-27T10:50:28.303Z","dependency_job_id":null,"html_url":"https://github.com/raikel/mcrops","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/raikel/mcrops","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raikel%2Fmcrops","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raikel%2Fmcrops/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raikel%2Fmcrops/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raikel%2Fmcrops/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/raikel","download_url":"https://codeload.github.com/raikel/mcrops/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raikel%2Fmcrops/sbom","scorecard":{"id":759244,"data":{"date":"2025-08-11","repo":{"name":"github.com/raikel/mcrops","commit":"8597f74e79d62f8184a9ff707ae1d6b627cb05df"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":1.7,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/8 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":0,"reason":"18 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: PYSEC-2021-856 / GHSA-5545-2q6w-2gh6","Warn: Project is vulnerable to: GHSA-6p56-wp2h-9hxr","Warn: Project is vulnerable to: PYSEC-2019-108 / GHSA-9fq2-x9r6-wfmf","Warn: Project is vulnerable to: PYSEC-2021-857 / GHSA-f7c7-j99h-c22f","Warn: Project is vulnerable to: GHSA-fpfv-jqm9-f5jm","Warn: Project is vulnerable to: GHSA-3448-vrgh-85xr","Warn: Project is vulnerable to: GHSA-8849-5h85-98qw","Warn: Project is vulnerable to: GHSA-fm39-cw8h-3p63","Warn: Project is vulnerable to: GHSA-fw99-f933-rgh8","Warn: Project is vulnerable to: GHSA-hxfw-jm98-v4mq","Warn: Project is vulnerable to: GHSA-jggw-2q6g-c3m6","Warn: Project is vulnerable to: GHSA-m6vm-8g8v-xfjh","Warn: Project is vulnerable to: GHSA-q799-q27x-vp7w","Warn: Project is vulnerable to: GHSA-qr4w-53vh-m672","Warn: Project is vulnerable to: GHSA-x3rm-644h-67m8","Warn: Project is vulnerable to: PYSEC-2023-183","Warn: Project is vulnerable to: PYSEC-2023-102","Warn: Project is vulnerable to: PYSEC-2023-114"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-22T22:48:17.699Z","repository_id":57440367,"created_at":"2025-08-22T22:48:17.699Z","updated_at":"2025-08-22T22:48:17.699Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32460781,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-29T22:27:22.272Z","status":"online","status_checked_at":"2026-04-30T02:00:05.929Z","response_time":57,"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":["agriculture","image-processing","opencv","python"],"created_at":"2024-11-06T21:15:45.236Z","updated_at":"2026-04-30T10:02:28.788Z","avatar_url":"https://github.com/raikel.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"Mcrops\n=======================\nmcrops is small library for processing images of agricultural fields. \nThe homepage of mcrops with user documentation is located on:\n\nhttps://mcrops.readthedocs.io\n\n.. image:: ./docs/_static/sample_output.jpg\n\nGetting started\n==========\n\nYou can use `pip` to install mcrops::\n\n    pip install mcrops\n\nAlternatively, you can download the latest source code using git::\n\n    git clone git://github.com/raikel/mcrops.git\n\nand run the setup command from the source directory::\n\n    python setup.py install\n\nfrom the source directory.\n\nExample usages\n============\n\nHere is a basic example usages of `mcrops`.\n\n.. code-block:: python\n\n    import math    \n    import cv2 as cv    \n    from mcrops import veget, rows, utils\n    \n    # Path to crop field image\n    image_path = 'path/to/image'\n    # Image resolution in pixels/meter (it has not to be an exact value)\n    res = 20\n    \n    # Load a crop field image\n    image = cv.imread(image_path)\n\n    h, w = image.shape[:2]\n    image_draw = image.copy()\n\n    # Segment vegetation\n    veg_mask = veget.segment_vegetation(image)\n\n    # Detect the crop field ROI area\n    roi_poly = veget.detect_roi(\n        veg_mask, row_sep=row_sep, resolution=res\n    )\n    # Draw the contours of the ROI area\n    cv.drawContours(\n        image=image_draw,\n        contours=[roi_poly],\n        contourIdx=-1,\n        color=(0, 0, 255),\n        thickness=8,\n        lineType=cv.LINE_AA\n    )\n\n    # Detect the mean crop rows direction\n    direction = rows.detect_direction(\n        veg_mask=veg_mask,\n        window_shape=(20, 30),\n        resolution=res\n    )\n    \n    # Draw an arrow indicating the direction of the crop rows\n    pt1 = (int(w/2), int(h/2))\n    length = res * 20\n    pt2 = (\n        pt1[0] + min(max(0, int(math.cos(direction) * length)), w - 1),\n        pt1[1] + min(max(0, int(math.sin(direction) * length)), h - 1)\n    )\n    cv.arrowedLine(image_draw, pt1, pt2, color=(0, 255, 0), thickness=8)\n\n    # Normalize the crop field image and the vegetation mask (trim them to ROI\n    # area and rotate them such that crop rows are horizontal)\n    image_rows, roi_poly_norm, _ = veget.norm_image(\n        image=image,\n        roi_poly=roi_poly,\n        rows_direction=direction\n    )\n    veg_mask, roi_poly_norm, _ = veget.norm_image(\n        image=veg_mask,\n        roi_poly=roi_poly,\n        rows_direction=direction,\n        is_mask=True\n    )\n    # Build a mask image from the ROI polyline\n    roi_mask = utils.poly_mask(roi_poly_norm, veg_mask.shape[:2])\n\n    # Create a row-oriented vegetation density map from the vegetation mask\n    density_map = veget.mask_density(\n        veg_mask,\n        roi_mask,\n        resolution=res,\n        cell_size=(8, 8)\n    )\n\n    # Convert the row-oriented vegetation density map to a color image\n    density_image = utils.array_image(density_map, colormap=cv.COLORMAP_JET)\n\n    # Detect the crop rows (ridges and furrows)\n    row_ridges, row_furrows = rows.detect_rows(\n        veg_mask,\n        roi_mask,\n        resolution=res,\n        row_sep=row_sep,\n        fusion_thr=0.4\n    )\n    # Draw the crop rows lines\n    image_rows = utils.draw_rows(image_rows, row_ridges)\n\n    cv.imshow('Crop field image', image_draw)\n    cv.imshow('Vegetation mask', veg_mask)\n    cv.imshow('Vegetation density map', density_image)\n    cv.imshow('Detected crop rows', image_rows)\n\n    cv.waitKey(0)\n    cv.destroyAllWindows()\n\nWorkflow to contribute\n======================\n\nTo contribute to mcrops, first create an account on `github\n\u003chttp://github.com/\u003e`_. Once this is done, fork the `mcrops repository\n\u003chttp://github.com/raikel/mcrops\u003e`_ to have your own repository,\nclone it using 'git clone' on the computers where you want to work. Make\nyour changes in your clone, push them to your github account, test them\non several computers, and when you are happy with them, send a pull\nrequest to the main repository.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fraikel%2Fmcrops","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fraikel%2Fmcrops","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fraikel%2Fmcrops/lists"}