
エントリーの編集

エントリーの編集は全ユーザーに共通の機能です。
必ずガイドラインを一読の上ご利用ください。
GCPのCloud Vision APIの使い方 - Qiita
記事へのコメント0件
- 注目コメント
- 新着コメント
このエントリーにコメントしてみましょう。
注目コメント算出アルゴリズムの一部にLINEヤフー株式会社の「建設的コメント順位付けモデルAPI」を使用しています

- バナー広告なし
- ミュート機能あり
- ダークモード搭載
関連記事
GCPのCloud Vision APIの使い方 - Qiita
def recognize_image1(input_image):#最後にstr_encode_fileに変える #pathからbase64にする場合 def pi... def recognize_image1(input_image):#最後にstr_encode_fileに変える #pathからbase64にする場合 def pil_image_to_base64(img_path): pil_image = Image.open(img_path) buffered = BytesIO() pil_image.save(buffered, format="PNG") str_encode_file = base64.b64encode(buffered.getvalue()).decode("utf-8") return str_encode_file #arrayからbase64にする場合 def array_to_base64(img_array): pil_image = Image.fromarray(np.uint8(img_array))