是否可以在 JavaScript 中读取图像的像素?
我有一堆带有徽章的照片,接近 1500 张,我需要一种方法来检测上面是否有黄色徽章。是否可以执行一个操作或脚本,每次都从精确的像素坐标对样本进行颜色采样,如果它找到代表徽章的颜色,则将其发送到特定文件夹,以便将其与找到的其他 jpeg 分组在一起有徽章。对此有什么想法或意见会有帮助吗?
I have a bunch of photos that have badges on them, close to 1500 of them, I need a way to detect if there is a yellow badge on it. Is it possible to make a action or a script to color sample from a exact pixel coordinate every time and if it finds the color that represents the badge then send it to a particular folder, for it to be grouped with other jpegs that were found to have a badge. Any thoughts or opinions on this would be helpful?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我知道这是旧的,但由于它是在 Photoshop 中标记的(并且它绝对可以在 Photoshop 中使用 JavaScript 完成),这里有一个解决方案:
I know this is old but since it was tagged in Photoshop (and it definitely CAN be done in Photoshop with JavaScript), here is a solution:
您可以在这里找到答案:
当用户点击图像时,如何使用 JavaScript 或 jQuery 读取图像的像素?
基本上你
You can find the answer here:
How to use JavaScript or jQuery to read a pixel of an image when user clicks it?
Basically you