{"id":13671159,"url":"https://github.com/xd-tayde/matting","last_synced_at":"2025-10-30T19:30:45.051Z","repository":{"id":86978380,"uuid":"123054686","full_name":"xd-tayde/matting","owner":"xd-tayde","description":"基于人像mask图层的人像抠出方法","archived":false,"fork":false,"pushed_at":"2018-02-27T01:33:16.000Z","size":184,"stargazers_count":42,"open_issues_count":0,"forks_count":11,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-11-11T08:44:01.317Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/xd-tayde.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}},"created_at":"2018-02-27T01:29:08.000Z","updated_at":"2024-09-28T14:03:57.000Z","dependencies_parsed_at":"2023-05-30T01:34:00.428Z","dependency_job_id":null,"html_url":"https://github.com/xd-tayde/matting","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/xd-tayde%2Fmatting","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xd-tayde%2Fmatting/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xd-tayde%2Fmatting/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xd-tayde%2Fmatting/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xd-tayde","download_url":"https://codeload.github.com/xd-tayde/matting/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239032245,"owners_count":19570770,"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-08-02T09:01:01.169Z","updated_at":"2025-10-30T19:30:38.062Z","avatar_url":"https://github.com/xd-tayde.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# 抠人像插件--matting.js\n\n### [demo](http://f2er.meitu.com/gxd/matting/example/index.html)\n\n基于人像识别`mask`图层技术，通过`mask`，可以使用该简易插件进行人像的抠出，便于在业务中自由替换背景，完成特定的需求\n\n使用方式：\n\n```js\nmatting({\n    image: '',  //包含结果图和mask图的服务端返回图；\n    export_type : 'base64',   // canvas / base64, 选择返回一个canvas节点或者返回base64；\n    export_quality: .9,  // 当导出为base64时图片的质量；\n    mask_zoom : 0.5 , // mask去除背景时的缩放比例，调节性能和质量的平衡\n    success(result){\n        // result 可能为 base64 或者 一个canvas节点；\n    },\n    error(src){\n\n    },\n});\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxd-tayde%2Fmatting","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxd-tayde%2Fmatting","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxd-tayde%2Fmatting/lists"}