Questions tagged [depth]

The depth of a node in a tree is the length of the path to its root. The depth of an image is the number of bits used to indicate the color of a single pixel.

The depth of a node in a tree is the length of the path to its root. The depth of the tree is the maximum depth of all nodes.

See also:


The depth of an image is the number of bits used to indicate the color of a single pixel.

See also:

742 questions
94
votes
1 answer

Python: Maximum recursion depth exceeded

I have the following recursion code, at each node I call sql query to get the nodes belong to the parent node. here is the error: Exception RuntimeError: 'maximum recursion depth exceeded' in
add-semi-colons
  • 18,094
  • 55
  • 145
  • 232
80
votes
6 answers

Listing the content of a tar file or a directory only down to some level

I wonder how to list the content of a tar file only down to some level? I understand tar tvf mytar.tar will list all files, but sometimes I would like to only see directories down to some level. Similarly, for the command ls, how do I control the…
Tim
  • 1
  • 141
  • 372
  • 590
70
votes
6 answers

Hitting Maximum Recursion Depth Using Pickle / cPickle

The background: I'm building a trie to represent a dictionary, using a minimal construction algorithm. The input list is 4.3M utf-8 strings, sorted lexicographically. The resulting graph is acyclic and has a maximum depth of 638 nodes. The first…
danben
  • 80,905
  • 18
  • 123
  • 145
66
votes
6 answers

Python: maximum recursion depth exceeded while calling a Python object

I've built a crawler that had to run on about 5M pages (by increasing the url ID) and then parses the pages which contain the info' I need. after using an algorithm which run on the urls (200K) and saved the good and bad results I found that the I'm…
YSY
  • 1,226
  • 3
  • 13
  • 19
42
votes
3 answers

Unexpected ConvertTo-Json results? Answer: it has a default -Depth of 2

Why do I get unexpected ConvertTo-Json results, why do I get values like System.Collections.Hashtable and/or why does a round-trip ($Json | ConvertFrom-Json | ConvertTo-Json) fail? Meta issue Stackoverflow has a good mechanism to prevent duplicate…
iRon
  • 20,463
  • 10
  • 53
  • 79
40
votes
7 answers

Precision of the kinect depth camera

How precise is the depth camera in the kinect? range? resolution? noise? Especially I'd like to know: Are there any official specs about it from Microsoft? Are there any scientific papers on the subject? Investigations from TechBlogs? Personal…
Fabian
  • 1,982
  • 4
  • 25
  • 35
33
votes
1 answer

How do you access tree depth in Python's scikit-learn?

I'm using scikit-learn to create a Random Forest. However, I want to find the individual depths of each tree. It seems like a simple attribute to have but according to the documentation,…
iltp38
  • 519
  • 2
  • 5
  • 13
33
votes
4 answers

Know the depth of a dictionary

Supposing we have this dict: d = {'a':1, 'b': {'c':{}}} What would be the most straightforward way of knowing the nesting depth of it?
tutuca
  • 3,444
  • 6
  • 32
  • 54
32
votes
6 answers

Implementing Depth First Search into C# using List and Stack

I want to create a depth first search which I have been somewhat successful in. Here is my code so far (Except my constructor, note the Vertex and Edge classes only contain properties, nothing important to post here): private Stack
Dumpen
  • 1,622
  • 6
  • 22
  • 36
28
votes
2 answers

Calculate surface normals from depth image using neighboring pixels cross product

As the title says I want to calculate the surface normals of a given depth image by using the cross product of neighboring pixels. I would like to use Opencv for that and avoid using PCL however, I do not really understand the procedure, since my…
ttsesm
  • 917
  • 5
  • 14
  • 28
25
votes
4 answers

OpenCV: How to visualize a depth image

I am using a dataset in which it has images where each pixel is a 16 bit unsigned int storing the depth value of that pixel in mm. I am trying to visualize this as a greyscale depth image by doing the following: cv::Mat depthImage; depthImage =…
Aly
  • 15,865
  • 47
  • 119
  • 191
24
votes
2 answers

What is the maximum depth of HTML documents in practice?

I want to allow embedding of HTML but avoid DoS due to deeply nested HTML documents that crash some browsers. I'd like to be able to accommodate 99.9% of documents, but reject those that nest too deeply. Two closely related question: What document…
Mike Samuel
  • 118,113
  • 30
  • 216
  • 245
24
votes
7 answers

Three.js / WebGL - transparent planes hiding other planes behind them

When you have two planes in Three.js / WebGL and one or both of them are transparent, sometimes the plane behind will be hidden by the transparent plane above. Why is this?
MaiaVictor
  • 51,090
  • 44
  • 144
  • 286
17
votes
3 answers

Python/OpenCV: Computing a depth map from stereo images

I have two stereo images that I'd like to use to compute a depth map. While I unfortunately do not know C/C++, I do know python-- so when I found this tutorial, I was optimistic. Unfortunately, the tutorial appears to be somewhat out of date. It not…
jwdink
  • 4,824
  • 5
  • 18
  • 20
14
votes
4 answers

How to render depth linearly in modern OpenGL with gl_FragCoord.z in fragment shader?

I read lots of information about getting depth with fragment shader. such as http://www.opengl.org/discussion_boards/ubbthreads.php?ubb=showflat&Number=234519 but I still don't know whether or not the gl_FragCoord.z is linear. GLSL specification…
tomriddle_1234
  • 3,145
  • 6
  • 41
  • 71
1
2 3
49 50