Wednesday, December 14, 2016

caffe.io.load_image Quick Facts

Quick facts on the numpy.ndarray object returned by caffe.io.load_image.

  • The array's shape is (height, width, 3)
  • The last shape value of 3 represents three color channels, in RGB order. This is important because OpenCV's imread function gives channels in BGR order.
  • The array has dtype=float32 with values in range 0.0-1.0. Again, this is important because OpenCV's imread function gives an array with dtype=uint8 with values in range 0-255.

I'm publishing this so I don't have to re-learn this "truth" every time I'm dealing with image loading and conversions.

2 comments:

  1. Thank you! Haven't gotten any good docs on what caffe.io.load_image returns.

    ReplyDelete
  2. Really, these quotes are the holistic approach towards mindfulness. In fact, all of your posts are. Proudly saying I’m getting fruitfulness out of it what you write and share. Thank you so much to both of you.
    Research Paper Publication
    Science Journal
    IEEE Projects
    Journal Impact Factor
    Highest Impact Factor Journal

    ReplyDelete