MarekKowalski / LiveScan3D

LiveScan3D is a system designed for real time 3D reconstruction using multiple Azure Kinect or Kinect v2 depth sensors simultaneously at real time speed.
MIT License
749 stars 202 forks source link

Problem with Caliberation #65

Open SethiShreya opened 1 year ago

SethiShreya commented 1 year ago

I am using two kinects with one marker it is not being calibrated and the result is two distinct point clouds. I have tried everything the docs said and can see that it is tracking the marker in the depth window but is showing caliberation=false for both markers. I have added the marker in the settings. Please help me out here as I don't really understand the concept of marker even when i have read all the explanations you have given in other issues. Also please tell me if i want to use two markers then how to adjust the translation and rotation i mean you said that point cloud is made when markers are set correctly, i want to ask how do we translate the value on the basis of real time measurement or what? Didn't really understand. Thanks

ChristopherRemde commented 1 year ago

Hey Sethi!

Which marker have you printed out? And can you upload a screenshot of the marker settings in your program? If Livescan recognizes your marker, you should see a green or red outline on the marker in the Client preview window. It would also help if you can show us a picture of your printed marker, sometimes the ink is too reflective/glossy or is too low in contrast.

For using multiple markers:

Imagine you have a world center in your scene, at 0,0,0 (XYZ). Livescan always centers the viewport around this center, and the marker places the content in relation to this center, so it's a good idea to have the marker always close to it, The marker offset is always in relation to this world center, If you don't set the transform or rotation of the marker (all values are 0) the marker will be located at the world center.

Now imagine you want to use four markers, arranged like a cube. For the best placement, the world center should be in the middle of the cube. So the offset should be calculated based on the distance of the marker from the center, as well as the rotation offset. I've drawn a small sketch to illustrate this

So let's say this is our coordinate system, XYZ, with the forward axis being on the Z axis. Therefore in the default rotation (0,0,0), our marker faces into the Z direction.

grafik

If we want to now use a cube configuration, and we say our marker width is 20cms, we arrange our markers like this:

grafik

Livescan uses centimeters for translation and euler angles for rotation. Our cube arrangement gives us the following values:

grafik

SethiShreya commented 1 year ago

preview of settings

image

I have used marker=0

It is not recognizing the marker as I could not see any green or red line also calibrated is showing false too. Can you please send me pictures of how you set up the cameras and marker which I can take as a reference to make mine?

SethiShreya commented 1 year ago

image

Printed marker image that i am using

ChristopherRemde commented 1 year ago

Hm, everything looks fine to me in your settings and the printed marker seems to be good aswell! Just to be sure, you did press on the "Calibrate" button inside the server windows after you made sure that both color and depth view of the client can see the marker fully?

You might have to experiement with lighting a bit, try to avoid direct sunlight, but also make sure to have some bright artifical lights in your room. The marker should be well-lit. Also try moving the marker around a bit and change the angle to the camera. In your final calibration you of course want the marker to be still, but just try to play around with it a bit too see if we can detect the marker at all.

If you want to, you can also send some screenshots of your client depth and color preview showing the marker (block out the rest of the room with MS Paint or something for privacy), so I can take a look if everythings looking good there!

SethiShreya commented 1 year ago

depth color These are the images well i haven't stick it to the wall because it was not tracking even when i have stick it to the wall

ChristopherRemde commented 1 year ago

Try gluing the marker onto a very flat piece of cardboard, wood, or something else, which does not bend.

SethiShreya commented 1 year ago

One marker worked!

SethiShreya commented 1 year ago
image image

image

Trying to do with two markers one is tracking but the other is not

SethiShreya commented 1 year ago

Is ther problem is with translation, dont know?

SethiShreya commented 1 year ago

Please help me with this too

ChristopherRemde commented 1 year ago

So several things:

SethiShreya commented 1 year ago

Thank you for all the responses, i am now able to track two markers, One last thing i want to ask is how are you setting up your environment for 4 kinects in demo video? I mean how many markers are you using and how are you arranging it?

ChristopherRemde commented 1 year ago

Good to hear that it is working now!

Coincidentally I'm writing up a detailed guide on multi-camera calibration with Livescan at the moment. If you're patient until the end of the week, I'll post a link to it here.

SethiShreya commented 1 year ago

Yeah no problem

SethiShreya commented 1 year ago

Hi, Are you done writing the blog as i was waiting for it to execute with 4 kinect devices?

ChristopherRemde commented 1 year ago

Hey! Sorry I got sick until yesterday and could not finish it yet. I'll have it done in the middle of the week I think!

SethiShreya commented 1 year ago

Hi, Are you done writing the blog?

ChristopherRemde commented 1 year ago

I've just finished writing the documentation on the Calibration process, you can view it here: https://github.com/BuildingVolumes/LiveScan3D/blob/development/docs/Website/content/docs/user-guide/calibration.md

SethiShreya commented 1 year ago

Thanks for the clear docs, I have a question, Well I want to ask if my setup is like I want to capture a person sitting on the chair and using a 4-cube marker setup then how will I place the cube to get all the sides of the person sitting on the chair and marker are readily captured by Kinect.

ChristopherRemde commented 1 year ago

I'd place the cube on the chair, but elevate it a bit with some boxes so that the backrest doesn't cover anything on the cube. Otherwise I'd arrange the kinects like in the graphic: https://github.com/BuildingVolumes/LiveScan3D/blob/development/docs/Website/content/docs/user-guide/images/Calibration/4_Marker_Setup.png

SethiShreya commented 1 year ago

Hello Thank you for all your support i am able to track 4 kinects, but i want to ask you one thing, i have 4 kinect dks and i am trying to connect all the four with daisy configuration but it wont work until i attach all the kinects to separate laptops and connect livescan client, So wont it work if i connect all the kinects with one computer or two?

ChristopherRemde commented 1 year ago

Hi! What specifially doesn't work? Do you get an error message? It should be able to run all kinects on one PC, that is in fact what I've been doing most of the time.

SethiShreya commented 1 year ago

Basically when i connect one kinect to the laptop and other to power source, and that kinect and connect to the server then i can only see one kinect connected, but when i connect other to other laptops and then server then only i can see other kinects and master subordinate relationship.

ChristopherRemde commented 1 year ago

Apologies that sentence was a bit hard to understand for me. Can you describe the process again but each step after the other, like this?

  1. Connect first Kinect to Laptop
  2. Connect second Kinect to Laptop
  3. Open two Livescan Clients on Laptop ... and so on?
SethiShreya commented 1 year ago

Sure

  1. I connect first kinect i.e. master to server laptop
  2. I connect other kinects to the master kinect as daisy configuration and didn't connect subordinate kinects to any laptop but only power and to each other
  3. I only connect one client with master kinect to server
  4. And enabled the temporary sync but can only see one kinect
  5. I experimented by connecting other subordinate kinects to connect with laptops and open livescan client for all and connect to server then only i can see other subordinated kinects. So i just wanted to ask if it is possible to use only one kinect for all the 4 kinects?
ChristopherRemde commented 1 year ago

Ah now I get it! No that is not possible. Also you don't get any advantages from this as far as I can tell, because temporary synchronisation only takes effect when two or more kinects are used for the same capture. If you use just one device, you don't need temporal sync. If you daisy chain all devices, you also need to use all devices for temporal sync, you can't pick just some devices you want. If you only want two devices synced for example, you have to chain only these two devices, and disconnect all other devices.

ChristopherRemde commented 1 year ago

Just to avoid misunderstandings, the sync cable only carries the sync signal, which is a simple 1bit signal, no other data. The kinects also only relay the sync signal, if they are connected to a PC, and started by a program into the right Sync Mode (Master, Subordinate)

songqiming97 commented 1 year ago

Hello, thank you for your reply, I have read the document you thanked, but the calibration is still successful. I have two Kinectv2 cameras, and put them face to face, the marks are placed in the middle, and the marks 0 and 1 are used, and the mark Y of 1 is turned to fill in 180°, and the other marks are 0, and the correction also appears green box, but it is still false

ChristopherRemde commented 1 year ago

This means the color camera can see the marker, but the depth camera can not. This is usually caused by the marker being too far away or too close to the sensor. Try moving the marker around. Sometimes this issue can also be caused by too much IR-light in the enviroment.

songqiming97 commented 1 year ago

Hello, thank you for your reply. Do you mean that I should also display the marked green outline in the depth image? image image As shown in the image above, shadows can only be roughly shown

songqiming97 commented 1 year ago

image The above picture is the image I clicked show live with two KinectV2s to view. I have a question: Why is the Marks displayed by kinectv2 at each end the Marks at the back of the display board? Is it because my board is too thin, I pasted marks of 0 and 1 on the front and back of a cardboard

ChristopherRemde commented 1 year ago

Hey!

The target looks fine, but your floor looks very reflective. You should try putting your setup somewhere else, where there aren't as many reflections. You only get the green outline in the color view, so this is fine.

About the displayed marks, this looks pretty good, the offset might just be some inaccurracy in the calibration process. Try putting your markers in a different environment with less reflective surfaces, and this might improve.

songqiming97 commented 12 months ago

According to your requirements, I pasted Post-it notes on the ground to prevent the ground from being light resistant, but the result of Calibrate still shows false。 微信图片_20230707113336 image image

songqiming97 commented 12 months ago

image I placed the two kinect positions opposite each other, the LiveScanServer connected Kinect face is tag 0, and the second Kinect V2 is shot tag 1

ChristopherRemde commented 12 months ago

In the last post it looks like your setup is correctly calibrated? So you managed to fix the problem?

songqiming97 commented 12 months ago

The point cloud data I photographed was Calibrated, but the LiveScanServer window showed Calibrated = false

ChristopherRemde commented 12 months ago

That's a bit odd for sure, but if the pointcloud is correctly calibrated, the calibration is successful!

I'm not too sure why this state isn't reflected in the server window, but it's probably just a visual bug.

songqiming97 commented 11 months ago

Hello, thank you for your reply. May I ask why my camera is at the same height, but the position of the green coordinate (Kinect V2 camera) in the show live screen is not at the same height, and the reconstructed data is slightly inclined。 image

ChristopherRemde commented 11 months ago

Could be multiple reasons:

songqiming97 commented 7 months ago

Hello, can you send the document about correction? It seems that the link is invalid

ChristopherRemde commented 7 months ago

Ah yes, I'm currently restructuring to put all the documentation on a website, so the file has moved here: https://github.com/BuildingVolumes/LiveScan3D/blob/development/docs/Website/content/docs/user-guide/calibration.md

songqiming97 commented 7 months ago

Hello, can I add your wechat or other contact information? I would like to ask you some questions

ChristopherRemde commented 7 months ago

You can join our discord if you'd like to! https://discord.gg/7sgwg5Eq

But also feel free to ask question here in the issues/open new issues, in this way other people can search for them if they have the same problem!

songqiming97 commented 7 months ago

OK, I'm in. Thank you

songqiming97 commented 7 months ago

Hello, I would like to ask you about my Calibrate problem,The two Kinectv2 cameras were placed symmetrically, with the mark placed in the center. In the software environment visio stdio 2019, I calibrated that the mark was always shown to be false. The mark was printed in A4 paper size, should it be changed to A3? image

image image

ChristopherRemde commented 7 months ago

It looks like your markers were mirrored on the horizontal axis before printing. Try mirroring them, after printing they should look like this https://github.com/MarekKowalski/LiveScan3D/blob/master/docs/calibration%20markers/0b.gif.

songqiming97 commented 7 months ago

Thanks for your patient reply, but I just reprinted it and re-calibrate it, but it still shows false image image

songqiming97 commented 7 months ago

Hello, I have looked up the relevant documentation on corrections and found that the depth map does not match the individual corrections in your documentation, and the interface for setting markers is different from your documentation KM~V1_PO770MOX7K@43B0TC

ChristopherRemde commented 7 months ago

Sorry, yes the documentation is for a new version of LiveScan, which unfortunately doesn't support Kinect V2 anymore. But altough the UI looks different, the functionality should be similar, with the biggest difference being that you manually need to add the markers and marker IDs in your version. Your settings look fine though!

To be honest, I'm really not sure what the problem might be anymore. Your settings look good, the markers are getting correctly detected, (As shown by the green outline) and the depth image also looks good.

You could try to experiement with the light settings a bit (switch the light on/off, or dimm it), and rotate/move the marker around a bit, that sometimes helps.

As a last resort, can you maybe upload a video where you go through the whole process of calibration, from Opening the app to trying calibration a few times?

songqiming97 commented 7 months ago

Hello, I would like to ask how many versions of vs are used for this project?