<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>namaza</author_name>
  <author_url>https://blog.hatena.ne.jp/namaza/</author_url>
  <blog_title>雑記</blog_title>
  <blog_url>https://ytrewq.hatenablog.com/</blog_url>
  <categories>
    <anon>小ネタ</anon>
  </categories>
  <description>完全に透明の部分しか渡せません。 Python 2.7.10 # -*- coding:utf-8 -*-import cv2 #アルファチャネルを読み込むためにcv2.IMREAD_UNCHANGEDを渡すimage = cv2.imread('exa.png',cv2.IMREAD_UNCHANGED)#countNonZeroは1チャネルの画像しか渡せないので、アルファチャネルのみ取り出すtransparentArray = cv2.split(image)[3]# == transparentArray = image[:,:,3]imageLen = image.shape[0] *…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fytrewq.hatenablog.com%2Fentry%2F2017%2F04%2F15%2F204713&quot; title=&quot;OpenCVで画像の透明なピクセルの割合を調べる - 雑記&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></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2017-04-15 20:47:13</published>
  <title>OpenCVで画像の透明なピクセルの割合を調べる</title>
  <type>rich</type>
  <url>https://ytrewq.hatenablog.com/entry/2017/04/15/204713</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
