Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Output of blobFromImage function

I am using cv2.blobFromImage function to pre-process the image before feeding to a dnn for face detection. I tried to display the output of this function. What I am getting is multiple images (9 images). My input image, code and output image are given below. Can anyone please tell me why 9 images are formed here?

Input image image description

Code

    import cv2
    import numpy as np

    img = cv2.imread('messi.jpeg')
    blob = cv2.dnn.blobFromImage(img,1.0,(300,300),[104,117,123],False,False)
    print(blob.shape)
    blobb = blob.reshape(blob.shape[2],blob.shape[3],blob.shape[1])
    cv2.imshow('Blob',blobb)
    cv2.waitKey(5000)
    cv2.destroyAllWindows()

Output image

image description

click to hide/show revision 2
retagged

updated 2019-02-04 04:36:50 -0500

berak gravatar image

Output of blobFromImage function

I am using cv2.blobFromImage function to pre-process the image before feeding to a dnn for face detection. I tried to display the output of this function. What I am getting is multiple images (9 images). My input image, code and output image are given below. Can anyone please tell me why 9 images are formed here?

Input image image description

Code

    import cv2
    import numpy as np

    img = cv2.imread('messi.jpeg')
    blob = cv2.dnn.blobFromImage(img,1.0,(300,300),[104,117,123],False,False)
    print(blob.shape)
    blobb = blob.reshape(blob.shape[2],blob.shape[3],blob.shape[1])
    cv2.imshow('Blob',blobb)
    cv2.waitKey(5000)
    cv2.destroyAllWindows()

Output image

image description

click to hide/show revision 3
retagged

updated 2019-02-04 04:37:03 -0500

berak gravatar image

Output of blobFromImage function

I am using cv2.blobFromImage function to pre-process the image before feeding to a dnn for face detection. I tried to display the output of this function. What I am getting is multiple images (9 images). My input image, code and output image are given below. Can anyone please tell me why 9 images are formed here?

Input image image description

Code

    import cv2
    import numpy as np

    img = cv2.imread('messi.jpeg')
    blob = cv2.dnn.blobFromImage(img,1.0,(300,300),[104,117,123],False,False)
    print(blob.shape)
    blobb = blob.reshape(blob.shape[2],blob.shape[3],blob.shape[1])
    cv2.imshow('Blob',blobb)
    cv2.waitKey(5000)
    cv2.destroyAllWindows()

Output image

image description