<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>takuya_1st</author_name>
  <author_url>https://blog.hatena.ne.jp/takuya_1st/</author_url>
  <blog_title>それマグで！</blog_title>
  <blog_url>https://takuya-1st.hatenablog.jp/</blog_url>
  <categories>
    <anon>magick</anon>
    <anon>ruby</anon>
    <anon>rmagick</anon>
  </categories>
  <description>画像がカラーか、白黒かを判別する方法では、偶然にはてな質問の回答を見つけたので、コピペで行っていた。正直言って何がどうなってるのかよくわかってなかった。自宅の書籍や書類を整理するために大量にスキャンしていると、やっぱりこの判定がほしいなと思った。そのためもう一度見直すことにした。 画像がカラー・モノクロを判定する。 convert コマンドで画像を変換する、閾値より上下で２値にする、最後にmean(平均）を取り出す。 convert 001.jpg \ -colorspace HSB \ -separate \ -delete 0 \ -fx &quot;u*v&quot; \ -blur 2x2 \ -thre…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Ftakuya-1st.hatenablog.jp%2Fentry%2F2023%2F04%2F05%2F230317&quot; title=&quot;画像が、白黒かカラーか判定する。(白黒に近いスキャン画像を判定する） - それマグで！&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url>https://cdn-ak.f.st-hatena.com/images/fotolife/t/takuya_1st/20230405/20230405222550.jpg</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2023-04-05 23:03:17</published>
  <title>画像が、白黒かカラーか判定する。(白黒に近いスキャン画像を判定する）</title>
  <type>rich</type>
  <url>https://takuya-1st.hatenablog.jp/entry/2023/04/05/230317</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
