-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HRIR interpolation point selection #76
Comments
Maybe this is interesting: |
Voronoi regions for a sphere: |
Cool, especially the second link. Now, we only need a person who is going to implement this. |
Pushed some code to a branch named vbap_style_interpolation. Here is the example from above. azi = [0; 1; 1; 5;]*pi/180;
elev = [0; 1 ; -1; 0;]*pi/180;
[x,y,z] = sph2cart(azi,elev,ones(4,1));
x0 = [x y z];
[x,y,z] = sph2cart(2*pi/180,0,1);
xs = [x y z];
[indeces,weights] = findconvexcone(x0,xs);
x0_int = x0(indeces,:);
scatter3(x0(:,1),x0(:,2),x0(:,3),[],[],'bo');
markersize = 70*weights+30*ones(3,1)
hold on
scatter3(xs(:,1),xs(:,2),xs(:,3),[],[],'rx')
scatter3(x0_int(:,1),x0_int(:,2),x0_int(:,3), markersize ,[],'ro');
xlabel('y'); zlabel('z');
view([90,0]); grid off; |
Is there literature describing the interpolation scheme in detail? |
That looks nice. I guess it would be good to specify several interpolation test cases to be able to compare different approaches. |
(This is in fact VBAP if all points lie on a sphere.) |
I just played around with Till's idea, which works nicely. I still wonder which points we really want to use for interpolation, though. See the picture below (just a modification of Till's example): In both cases the algorithm uses the three points marked in red but the upper point has a weight of zero. Does this selection make sense in the right case as the upper point is so close to the desired position? Another question is which three points (forming a triangle containing the desired point) are selected by the algorithm if the desired point lies on an intersection of several triangle edges. For example if the desired point in the pictures below would lie exactly between the upper and the lower point. Till is just checking on that. |
Sorry, I made a mistake in these examples: Still it may be a worthwhile improvement over the current version: The three nearest neighbors are selected such that the point lies within the triangle. |
I created a pull request for this. |
I have run the test function and everything works fine. |
In
which I'm not completely understand. Can this happen for typical loudspeaker setups? If so, could you please add an example for such a case to the test function as well. |
As an example, let's assume a grid which covers only a spherical cap around the northpole (of the unit sphere). Two kinds of errors may occur: a) requested point: northpole. b) requested point: southpole. I added testcases for these. The workaround: add dummy points |
Thanks for all test cases, I added now For the actual HRTF interpolation we are still free to choose how to do it and should also carefully have a look at all the test cases where The update of the interpolation method could be done together with #102 or done in a new pull request afterwards as #102 incorporates a more special case of interpolation that works only for some HRTF data sets that have no noise in the phase at low frequencies. |
As far as I know, this functions compute the voronoi regions for cartesian coordinates. We are looking for the voronoi interpolation on the surface of a sphere, which requires to use a different metric. I however agree that we can postpone this implementation and create a new pull request, when it's ready. |
Is this issue covered by #130 and we can close it? Our implementations do not use Voronoi, would this still be better? |
I'm not sure which one is better. In some cases Voronoi interpolation makes intuitively more sense to me, e.g. for larger gaps in a dataset. I don't see myself trying out Voronoi interpolation in the near future to compare it, though. Looks more a research question to me, though I might not be aware of all relevant literature. |
I'm not sure if the simple usage of nearest neighbor points for performing the interpolation is the best approach for impulse responses. Here is an easy example:
As you can see we want to get the point shown as red cross. The red circles are the three nearest neighbors that are selected for the interpolation. Afterwards it is checked if the nearest and second nearest neighbor have the same azimuth or elevation. If so only these points are used. In this example all three points will be used for interpolation.
The problem is that in this case it would in my opinion make more sense to use just the two points that have both an elevation of 0°. The problem is I don't know if we are able to write an algorithm that does this sort of clever selection that works with every grid and point spacing.
Has anyone some experience on this?
The text was updated successfully, but these errors were encountered: