Ask Your Question

DNN blobFromImage gives -1*-1 in Android. [closed]

asked 2018-11-19 04:32:30 -0500

Mishal077 gravatar image

updated 2018-11-19 04:35:54 -0500

berak gravatar image

I am using a model with extension .net which works perfectly fine in Python.

net = cv2.dnn.readNet('models/')
blob = cv2.dnn.blobFromImage(image, 1 / 255.0, (1024, 512), 0,
        swapRB=True, crop=False)

but when I tried to do the same on android I got blob size -1*-1 ideal it should not it should be in the passed dimension only.

I had used this link for the reference.

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by dkurt
close date 2018-11-27 06:55:54.337454

1 answer

Sort by ยป oldest newest most voted

answered 2018-11-20 03:21:07 -0500

dkurt gravatar image

Please check blob.size(0), blob.size(1), blob.size(2) and blob.size(3) instead of rows and cols.

edit flag offensive delete link more

Question Tools

1 follower


Asked: 2018-11-19 04:32:30 -0500

Seen: 493 times

Last updated: Nov 20 '18