从图像中检索主要颜色的工具_Ruby_代码_下载

上传者: 38334677 | 上传时间: 2022-06-15 14:06:22 | 文件大小: 747KB | 文件类型: ZIP
用法 调色板 palette = Gauguin::Painting.new("path/to/image.png").palette 上图的结果是: { rgb(204, 204, 204)[0.5900935269505287] => [ rgb(77, 77, 77)[7.383706620723603e-0 自定义配置 您可以配置以下4参数: max_colors_count(默认值为10) - 调色板将包含的最大颜色数 colors_limit(默认值为10000) - 计算调色板时将考虑的最大颜色数 - 如果图像有太多颜色,则计算所有颜色的分组效率不高,因此只colors_limit使用最大百分比的颜色 min_percentage_sum(默认值为0.981) - 计算应忽略哪些颜色时使用的参数。颜色按百分比降序排序,然后min_percentage_sum考虑百分比总和的颜色 color_similarity_threshold(默认值为)- Lab 颜色空间25中的最大距离,在分组时将两种颜色视为相同 要配置上述任何选项,您可以使用配置块

文件下载

资源详情

[{"title":"( 59 个子文件 747KB ) 从图像中检索主要颜色的工具_Ruby_代码_下载","children":[{"title":"gauguin-master","children":[{"title":".gitignore <span style='color:#111;'> 128B </span>","children":null,"spread":false},{"title":"README.md <span style='color:#111;'> 4.04KB </span>","children":null,"spread":false},{"title":"Gemfile <span style='color:#111;'> 92B </span>","children":null,"spread":false},{"title":"Guardfile <span style='color:#111;'> 189B </span>","children":null,"spread":false},{"title":".rspec <span style='color:#111;'> 32B </span>","children":null,"spread":false},{"title":"spec","children":[{"title":"integration","children":[{"title":"painting_spec.rb <span style='color:#111;'> 2.04KB </span>","children":null,"spread":false},{"title":"samples_spec.rb <span style='color:#111;'> 1.39KB </span>","children":null,"spread":false}],"spread":true},{"title":"support","children":[{"title":"pictures","children":[{"title":"12_colors.png <span style='color:#111;'> 2.78KB </span>","children":null,"spread":false},{"title":"gray_and_black.png <span style='color:#111;'> 32.37KB </span>","children":null,"spread":false},{"title":"unique_colors.png <span style='color:#111;'> 1.47KB </span>","children":null,"spread":false},{"title":"10_colors.png <span style='color:#111;'> 2.54KB </span>","children":null,"spread":false},{"title":"transparent_background.png <span style='color:#111;'> 91.83KB </span>","children":null,"spread":false},{"title":"not_unique_colors.png <span style='color:#111;'> 1.49KB </span>","children":null,"spread":false},{"title":"gauguin.png <span style='color:#111;'> 12.55KB </span>","children":null,"spread":false},{"title":"samples","children":[{"title":"sample7.png <span style='color:#111;'> 92.69KB </span>","children":null,"spread":false},{"title":"sample9.png <span style='color:#111;'> 59.85KB </span>","children":null,"spread":false},{"title":"sample4.png <span style='color:#111;'> 87.80KB </span>","children":null,"spread":false},{"title":"sample1.png <span style='color:#111;'> 81.75KB </span>","children":null,"spread":false},{"title":"sample3.png <span style='color:#111;'> 32.37KB </span>","children":null,"spread":false},{"title":"sample5.png <span style='color:#111;'> 41.68KB </span>","children":null,"spread":false},{"title":"sample2.png <span style='color:#111;'> 38.72KB </span>","children":null,"spread":false},{"title":"sample10.png <span style='color:#111;'> 31.69KB </span>","children":null,"spread":false},{"title":"sample8.png <span style='color:#111;'> 44.39KB </span>","children":null,"spread":false},{"title":"sample11.png <span style='color:#111;'> 21.29KB </span>","children":null,"spread":false},{"title":"sample6.png <span style='color:#111;'> 46.90KB </span>","children":null,"spread":false}],"spread":false},{"title":"too_many_colors.png <span style='color:#111;'> 1.64KB </span>","children":null,"spread":false}],"spread":true}],"spread":true},{"title":"lib","children":[{"title":"gauguin","children":[{"title":"colors_limiter_spec.rb <span style='color:#111;'> 690B </span>","children":null,"spread":false},{"title":"noise_reducer_spec.rb <span style='color:#111;'> 1.17KB </span>","children":null,"spread":false},{"title":"colors_retriever_spec.rb <span style='color:#111;'> 2.48KB </span>","children":null,"spread":false},{"title":"color_spec.rb <span style='color:#111;'> 3.07KB </span>","children":null,"spread":false},{"title":"painting_spec.rb <span style='color:#111;'> 1.56KB </span>","children":null,"spread":false},{"title":"image_recolorer_spec.rb <span style='color:#111;'> 2.51KB </span>","children":null,"spread":false},{"title":"image_spec.rb <span style='color:#111;'> 2.07KB </span>","children":null,"spread":false},{"title":"palette_serializer_spec.rb <span style='color:#111;'> 599B </span>","children":null,"spread":false},{"title":"color_space","children":[{"title":"rgb_vector_spec.rb <span style='color:#111;'> 296B </span>","children":null,"spread":false},{"title":"xyz_vector_spec.rb <span style='color:#111;'> 342B </span>","children":null,"spread":false}],"spread":false},{"title":"colors_clusterer_spec.rb <span style='color:#111;'> 4.14KB </span>","children":null,"spread":false},{"title":"image_repository_spec.rb <span style='color:#111;'> 307B </span>","children":null,"spread":false}],"spread":false}],"spread":true},{"title":"spec_helper.rb <span style='color:#111;'> 1.18KB </span>","children":null,"spread":false}],"spread":true},{"title":"LICENSE.txt <span style='color:#111;'> 1.08KB </span>","children":null,"spread":false},{"title":".travis.yml <span style='color:#111;'> 202B </span>","children":null,"spread":false},{"title":"lib","children":[{"title":"gauguin","children":[{"title":"image_repository.rb <span style='color:#111;'> 106B </span>","children":null,"spread":false},{"title":"color_space.rb <span style='color:#111;'> 140B </span>","children":null,"spread":false},{"title":"palette_serializer.rb <span style='color:#111;'> 439B </span>","children":null,"spread":false},{"title":"colors_retriever.rb <span style='color:#111;'> 813B </span>","children":null,"spread":false},{"title":"noise_reducer.rb <span style='color:#111;'> 678B </span>","children":null,"spread":false},{"title":"colors_clusterer.rb <span style='color:#111;'> 1.35KB </span>","children":null,"spread":false},{"title":"color.rb <span style='color:#111;'> 1.50KB </span>","children":null,"spread":false},{"title":"image_recolorer.rb <span style='color:#111;'> 639B </span>","children":null,"spread":false},{"title":"colors_limiter.rb <span style='color:#111;'> 298B </span>","children":null,"spread":false},{"title":"version.rb <span style='color:#111;'> 39B </span>","children":null,"spread":false},{"title":"image.rb <span style='color:#111;'> 1.19KB </span>","children":null,"spread":false},{"title":"color_space","children":[{"title":"lab_vector.rb <span style='color:#111;'> 82B </span>","children":null,"spread":false},{"title":"xyz_vector.rb <span style='color:#111;'> 648B </span>","children":null,"spread":false},{"title":"rgb_vector.rb <span style='color:#111;'> 815B </span>","children":null,"spread":false}],"spread":false},{"title":"painting.rb <span style='color:#111;'> 1.13KB </span>","children":null,"spread":false}],"spread":false},{"title":"gauguin.rb <span style='color:#111;'> 1.09KB </span>","children":null,"spread":false}],"spread":true},{"title":"Rakefile <span style='color:#111;'> 201B </span>","children":null,"spread":false},{"title":"gauguin.gemspec <span style='color:#111;'> 1.21KB </span>","children":null,"spread":false}],"spread":false}],"spread":true}]

评论信息

免责申明

【只为小站】的资源来自网友分享,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,【只为小站】 无法对用户传输的作品、信息、内容的权属或合法性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论 【只为小站】 经营者是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。
本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二条之规定,若资源存在侵权或相关问题请联系本站客服人员,zhiweidada#qq.com,请把#换成@,本站将给予最大的支持与配合,做到及时反馈和处理。关于更多版权及免责申明参见 版权及免责申明