Ask Your Question

alecda's profile - activity

2020-10-13 15:47:51 -0600 asked a question opencv world not in build folder

opencv world not in build folder I have successfully built opencv version 4.4.0 with Cuda support Cuda toolkit v11.2 and

2020-10-09 09:27:29 -0600 edited question Error on forward method of cv2.dnn

Error on forward method of cv2.dnn I am able to load the load a frozen graph but when I try to use the forward method I

2020-10-09 09:18:32 -0600 asked a question Error on forward method of cv2.dnn

Error on forward method of cv2.dnn I am able to load the load a frozen graph but when I try to use the forward method I

2020-10-08 19:23:48 -0600 commented question Error from cv2.dnn.readNetFromTensorflow Lambda layer

@berak will do, It is a lambda layer just performing image centering so img/255-.5

2020-10-07 16:43:32 -0600 asked a question Error from cv2.dnn.readNetFromTensorflow Lambda layer

Error from cv2.dnn.readNetFromTensorflow Lambda layer I am encountering the following error when I try to make the forwa

2020-07-29 08:33:50 -0600 marked best answer calculating surface normal map from depth map weird errors:

I am attempting to calculate a surface normal map from my depth map using the following code:

import numpy as np
import cv2
depth=cv.imread(depthpath)
normals=np.zeros((depth.shape[0],depth.shape[1],3)
for x in range(0,depth.shape[0],1):
    for y in range(0,depth.shape[1],1):
        dzdx=(depth[x+1,y,0]-depth[x-1,y,0])/2
        dzdy=(depth[x,y+1,0]-depth[x,y-1,0])/2
        sub=np.asarray([-dzdx,-dzdy,1])
        normals[x,y,:]=sub/np.linalg.norm(sub)

this is based off the following thread: https://answers.opencv.org/question/8...

But I am getting a very odd output see the attached depth map and surface normal map: image description image description

Does anyone have any thoughts as to what is going on here?

2020-07-29 08:33:50 -0600 received badge  Scholar (source)
2020-07-29 07:23:10 -0600 commented answer calculating surface normal map from depth map weird errors:

sloppy mistakes fixed, cheers mate

2020-07-28 13:14:16 -0600 commented question calculating surface normal map from depth map weird errors:

@berak I would be accepting of a coarse approximation that looks decent like what can be seen in the linked post, I have

2020-07-28 13:07:17 -0600 commented question calculating surface normal map from depth map weird errors:

@berak obviously there are issues as we are not in the continuous setting. Furthermore, I would say there are even more

2020-07-28 13:06:35 -0600 commented question calculating surface normal map from depth map weird errors:

@berak Sure it is not anything different than the linked post: Reads in depth map initializes surface normal map loops o

2020-07-28 13:06:11 -0600 commented question calculating surface normal map from depth map weird errors:

Sure it is not anything different than the linked post: Reads in depth map initializes surface normal map loops over the

2020-07-28 12:41:57 -0600 commented question calculating surface normal map from depth map weird errors:

@berak even if I dont just do depth[x,y,0] and read in the way you suggest I get the same surface normal output...

2020-07-28 12:39:21 -0600 edited question calculating surface normal map from depth map weird errors:

calculating surface normal map from depth map weird errors: I am attempting to calculate a surface normal map from my de

2020-07-28 12:39:01 -0600 commented question calculating surface normal map from depth map weird errors:

sorry yes I know the code I actually used extracts a single channel since they are the same image stacked three times.

2020-07-28 11:32:01 -0600 asked a question calculating surface normal map from depth map weird errors:

calculating surface normal map from depth map weird errors: I am attempting to calculate a surface normal map from my de

2020-04-25 13:44:12 -0600 asked a question More than one input is Const Op

More than one input is Const Op System information (version) Detailed description I am trying to serve the following gi

2020-04-25 13:01:40 -0600 received badge  Enthusiast
2020-04-20 17:03:46 -0600 edited question OpenCV(4.1.2) Error: Assertion failed (nodesMapIt != nodesMap.end()) in cv::dnn::dnn4_v20190902::sortByExecutionOrder,

OpenCV(4.1.2) Error: Assertion failed (nodesMapIt != nodesMap.end()) in cv::dnn::dnn4_v20190902::sortByExecutionOrder, I

2020-04-20 14:43:19 -0600 asked a question OpenCV(4.1.2) Error: Assertion failed (nodesMapIt != nodesMap.end()) in cv::dnn::dnn4_v20190902::sortByExecutionOrder,

OpenCV(4.1.2) Error: Assertion failed (nodesMapIt != nodesMap.end()) in cv::dnn::dnn4_v20190902::sortByExecutionOrder, I

2020-04-16 20:12:02 -0600 commented question Can cv::dnn::Net take std::vector as argument?

I just wanted to make sure there was not any errors. I know this but sometimes c++ is weird about data types.

2020-04-16 20:02:18 -0600 asked a question Can cv::dnn::Net take std::vector as argument?

Can cv::dnn::Net take std::vector as argument? Say I have a pretrained model in tensorflow that accepts as input $(batch

2020-04-16 14:43:57 -0600 received badge  Editor (source)
2020-04-16 14:43:57 -0600 edited question OpenCV(4.1.2) Error: Unspecified error (FAILED: ReadProtoFromBinaryFile(param_file, param).

errors regarding cv::dnn:readNetFromTensorflow I have a pretrained model in tensorflow and I converted the checkpoint da

2020-04-16 14:25:04 -0600 asked a question OpenCV(4.1.2) Error: Unspecified error (FAILED: ReadProtoFromBinaryFile(param_file, param).

errors regarding cv::dnn:readNetFromTensorflow I have a pretrained model in tensorflow and I converted the checkpoint da

2020-04-02 13:16:06 -0600 asked a question opencv_world412d.dll was not found

opencv_world412d.dll was not found I have been trying to follow this guide to set up opencv with visual studio: https://