## RGBD alignment without explicit transformation between RGB and depth

I have a set of RGB-D scans of the same scene, corresponding camera poses, intrinsics and extrinsics for both color and depth cameras. RGB’s resolution is 1290×960, depth’s is 640×480.

Depth is pretty accurate, but still noisy, the same with camera poses. However, both intrinsics and extrinsics are not very accurate: for example, intrinsics does not introduce any distortion terms, while images are definitely distorted. Extrinsics tell that both cameras take place exactly at the same point, since they are just identity matrices. It could be decent approximation though.

When I try to compute a point cloud from a frame by downsampling RGB, unprojecting depth, transforming it with RGB extrinsics and projecting with RGB’s intrinsics, it looks like RGB frame is shifted by a few cm from depth – for example, an object’s border could be colored as background.

One might assume that such artifacts could be eliminated by aligning depth to RGB with improved extrinsics. Is there a way to estimate more accurate transformation between RGB and depth in such scenario?

I’m familiar with pretty relevant question, but there you have required Rt matrix for both cameras.

In case of well-performing monocular depth estimation, one could align two point clouds (computed from depth and estimated from RGB) directly and determine required transformation.

Am I missing something and there is well-known approach for this problem?

## Solve recurrence relation that depends on depth of recursion

The specific problem I’m working on is the puzzle presented in this video. For those who don’t want to watch the video, my summary of the puzzle is:

A frog is sitting on the edge of a pond facing the opposite bank. In front of the frog, running along the pond’s diameter, is a line of $$N$$ lilypads. This is a very athletic frog: it is able in a single leap to land on any of the $$N$$ lilypads in the pond or on the opposite bank (for a total of $$N + 1$$ possible destinations). The frog first considers all $$N+1$$ positions in front of it, chooses one randomly with uniform probability, and then jumps to this location. It then repeats the process of choosing a new random position from those remaining in front of it (never jumping backwards). This goes on until the frog eventually reaches the opposite bank.

The puzzle is twofold: First, if $$N=10$$, what is the expectation value of the number of jumps the frog will take to reach the other side of the pond? Second, find an explicit formula (NOT a recurrence relation!) for the expectation value of the number of jumps in general for $$N$$ lilypads.

(It’s a great puzzle; if you haven’t yet given it a shot, I’d highly recommend doing so before reading any possible spoilers in the rest of this post!).

To attempt this puzzle, I first calculated the first few terms by hand and then tried to generalize my result. I eventually came up with a recursive algorithm for the expectation value $$f$$:

def f(n, depth=1):     if n == 0:         return depth     else:         return (n * f(n - 1, depth) + f(n - 1, depth + 1)) / (n + 1) 

However, the second part of the puzzle explicitly disallows recurrence relations as solutions, so I am trying to un-roll/solve the recurrence relation. There are already several questions on strategies for solving recurrence relations (see this and this), but none I can find on solving recurrence relations which are dependent on the depth of recursion. Any help on how to do this is appreciated.

## wordpress custom menu – show parents, siblings, children depending on depth

looking and trying for hours to find a solution for the following output of a wordpress custom menu. Hope you can help. I do not know where to start: custom menu walker, css, functions.php

I have a custom menu with “individual links” (so no pages or posts or categories) with Link and Link-Text. Right now depth is 5 (could be 6,7.. in the future).

Sport    Bike      Bikeparts        Seats          Mountainbike          Roadbike        Breaks          Break Levers          Adapters      Bike Add Ons        Bottle Holder    Water      Stand Up Paddling        Paddel        Boards    Air      Wingsuits  Automotive   car   motorbike Tools 

What should it be: See following scenarios: Default View on main page (depth 0):

Sport Automotive Tools 

Click on “Sport”:

Sport (bold)    Bike    Water    Air Automotive Tools 

Click on “Bike”:

Sport (bold)    Bike (bold)      Bikeparts      Bike Add Ons    Water    Air Automotive Tools 

Click on “Bikeparts”:

Sport (bold)    Bike (bold)      Bikeparts (bold)        Seats        Breaks      Bike Add Ons Automotive Tools 

Click on “Breaks”:

Sport (bold)    Bike (bold)      Bikeparts (bold)        Seats        Breaks (bold)          Break Levers          Adapters Automotive Tools 

Click on “Break Levers”:

Sport (bold)    Bike (bold)      Bikeparts (bold)        Breaks (bold)          Break Levers (bold)          Adapters Automotive Tools 

So you see from Depth 1 if you start depth at 0 (step: click on Bike) and deeper you will always see all depth 0 menu items (sport, automotive, Tools), all siblings from this active menu item (bike) under active parent (sport) and all children of active menu item (bike).

What i have right now is the solution from https://christianvarga.com/how-to-get-submenu-items-from-a-wordpress-menu-based-on-parent-or-sibling/ where i replaced:

} else if ( ! ( isset( $args->show_parent ) && in_array($  item->ID, $menu_item_parents ) ) ) {  with } else if ( ! empty($  item->menu_item_parent ) ) { 

So right now it works only with the first level. if i click on sport i do not see submenu from automotive.

I hope anybody can help.