Skip to content
This repository has been archived by the owner on Aug 22, 2024. It is now read-only.

about green_screen example #1420

Open
ponyzhou404 opened this issue Nov 19, 2020 · 2 comments · May be fixed by #1877
Open

about green_screen example #1420

ponyzhou404 opened this issue Nov 19, 2020 · 2 comments · May be fixed by #1877
Assignees
Labels
Bug Something isn't working Code Sample This issue is related to a code sample Triage Approved The Issue has been approved by an Azure Kinect team member.

Comments

@ponyzhou404
Copy link

In /examples/green_screen/main.cpp line 226,
Transformation tr_secondary_depth_to_main_color=tr_secondary_depth_to_secondary_color.compose_with(tr_secondary_color_to_main_color);

I think it should be,
tr_secondary_depth_to_main_color=tr_secondary_color_to_main_color.compose_with(tr_secondary_depth_to_secondary_color);.

Due to the perivious rotation also effects next translation, the order of matrix multiplication can`t changed here. If changed, it will cause some problem like #803 demonstrated.

In this green_screen example, point transformation to secondary color camera coordinate first, so it should multiply tr_secondary_depth_to_secondary_color first.

@qm13 qm13 self-assigned this Nov 19, 2020
@qm13 qm13 added Triage Needed The Issue still needs to be reviewed by Azure Kinect team members. Ask a Question A question for the community Code Sample This issue is related to a code sample and removed Triage Needed The Issue still needs to be reviewed by Azure Kinect team members. labels Nov 19, 2020
@qm13 qm13 assigned wes-b and unassigned qm13 Nov 19, 2020
@wes-b
Copy link
Contributor

wes-b commented Nov 19, 2020

My transformation (matrix) skills are rusty, but I think you are effectively saying that in our compose_with structure that H1 * H2 != H2 * H1. Is that correct? That would effectively be the change you are suggesting, correct?

In this green_screen example, point transformation to secondary color camera coordinate first, so it should multiply tr_secondary_depth_to_secondary_color first.

Can you share more detail on this? A link would be fine. Are you able to test this and confirm it improves the results? Due to COVID testing from home is tricky.

@ponyzhou404
Copy link
Author

My transformation (matrix) skills are rusty, but I think you are effectively saying that in our compose_with structure that H1 * H2 != H2 * H1. Is that correct? That would effectively be the change you are suggesting, correct?

Yes,that is all I mean.

Can you share more detail on this? A link would be fine. Are you able to test this and confirm it improves the results? Due to COVID testing from home is tricky.

In the comment of line 226,it said
// We now have the secondary depth to secondary color transform. We also have the transformation from the // secondary color perspective to the main color perspective from the calibration earlier. Now let's compose the // depth secondary -> color secondary, color secondary -> color main into depth secondary -> color main
so the point transformates to secondary color camera coordinate first.
And then make X the point (x,y,z),
DSC_0032
as you can see, the order can`t be exchanged. So we should mutiply the tr_secondary_depth_to_secondary_color first.

And I rewrite green_screen to show an point cloud.
screenshot-1605854884
the order in your sample show like this. It make an small angel error with two point cloud.
screenshot-1605854607
and when I change the order of mutiplication, the angel disapear.

Sorry, English is not my native language and this paragraph may be difficult to understand.

@wes-b wes-b added Bug Something isn't working and removed Ask a Question A question for the community labels Nov 20, 2020
@qm13 qm13 assigned jaygullapalli and unassigned wes-b Apr 13, 2021
@qm13 qm13 added the Triage Approved The Issue has been approved by an Azure Kinect team member. label Apr 13, 2021
@spschul spschul linked a pull request Jan 14, 2023 that will close this issue
7 tasks
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug Something isn't working Code Sample This issue is related to a code sample Triage Approved The Issue has been approved by an Azure Kinect team member.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants