Giter VIP home page Giter VIP logo

Comments (6)

Erol444 avatar Erol444 commented on August 15, 2024

Hi @corkoh did you try to debug the error - where does the issue start?

from depthai-experiments.

corkoh avatar corkoh commented on August 15, 2024

Here is the full error message. I looks like it starts in the PointCloudVisualizer class where it passes the camera list. The geometry:pointcloud is also a zero value.

I had tried to fill in the NoneType (h variable) by calling get_box_top before It does this math, and took out the return for h in the get_dimensions that is called right before this error.

That gave me some other errors, and so I figured I would reach out before I get carried away changing things I dont fully understand.

Traceback (most recent call last):
File "../depthai-experiments-master/gen2-multiple-devices/box-measurement/main.py", line 20, in
PointCloudVisualizer(cameras)
File "../depthai-experiments-master/gen2-multiple-devices/box-measurement/point_cloud_visualizer.py", line 33, in init
self.update()
File "../depthai-experiments-master/gen2-multiple-devices/box-measurement/point_cloud_visualizer.py", line 46, in update
self.vizualise_box()
File "../depthai-experiments-master/gen2-multiple-devices/box-measurement/point_cloud_visualizer.py", line 58, in vizualise_box
if lwh > config.min_box_size:
TypeError: unsupported operand type(s) for *: 'float' and 'NoneType'

from depthai-experiments.

corkoh avatar corkoh commented on August 15, 2024

Update: I played with the RGBD-PointCloud-Fusion and noticed that with the calibration I had the point cloud never aligned. I have since done several calibrations and different camera angles until the pointcloud aligned almost perfectly.

I then tried the Box Measurement and It worked. The pointcloud was a lot smaller and it did not pick up the length or width of the box, only the height. The box was cut off in the smaller pointcloud, so that could be why I only got the height.

Are there specific heights, angles, etc to get better consistent results?

Also my end goal is checking the size of a mattress, would this be feasible?

from depthai-experiments.

Erol444 avatar Erol444 commented on August 15, 2024

Hi @corkoh , Could you share some photos of camera angles, or how cameras see the box? wrt mattress - I'd say so, shouldn't be any more complicated than a box:)

from depthai-experiments.

corkoh avatar corkoh commented on August 15, 2024

Here is similar to what I had 'working' earlier. (Top down view, I chose this because it also seemed the most accurate when doing the single device box estimation.) Its not working now, as I was trying to get a corner angle and a side angle to work with no success.

Screenshot 2023-04-06 at 2 12 57 PM

Screenshot 2023-04-06 at 1 55 43 PM

I can see in this with pointcloud fusion that it is not aligning the checkerboards on the correct Z axis. Camera1 checkerboard appears far below.

Screenshot 2023-04-06 at 1 55 56 PM

I can not consistently get the checkerboard to align on the pointcloud. I think this is my problem. Pressing the 'A' key does not align, it crashes every time. The one time It aligned almost correctly the one time the box estimation worked but did not capture all dimensions.

I have not had any success with any other camera angles yet.

Here is the output of the align button from the point cloud fusion:

Traceback (most recent call last):
File "../gen2-multiple-devices/rgbd-pointcloud-fusion/main.py", line 21, in
PointCloudVisualizer(cameras)
File "../gen2-multiple-devices/rgbd-pointcloud-fusion/point_cloud_visualizer.py", line 28, in init
self.update()
File "../gen2-multiple-devices/rgbd-pointcloud-fusion/point_cloud_visualizer.py", line 38, in update
self.point_cloud_window.poll_events()
File "../gen2-multiple-devices/rgbd-pointcloud-fusion/point_cloud_visualizer.py", line 13, in
self.point_cloud_window.register_key_callback(ord('A'), lambda vis: self.align_point_clouds())
File "../gen2-multiple-devices/rgbd-pointcloud-fusion/point_cloud_visualizer.py", line 60, in align_point_clouds
result_icp = o3d.pipelines.registration.registration_colored_icp(
AttributeError: module 'open3d' has no attribute 'pipelines'

from depthai-experiments.

corkoh avatar corkoh commented on August 15, 2024

Ok I got box estimate to work again, the point cloud still does not line up perfectly. But the code is running since its close. I cleaned up my work space and got a proper table instead of a mattress. Not sure that changing out the surface helped any, but was able to get this angle working. The dimensions are not accurate. I imagine this is because the pointclouds dont fuse perfectly.

Here is my current set up:

Both cameras can see the checkerboard clearly, and when calibrating, they both find the same corner and orientate the x,y,z axis properly. So everything looks good when calibrating.

Screenshot 2023-04-07 at 7 47 38 AM

Screenshot 2023-04-07 at 7 33 03 AM

I rotated the pointcloud to show the discrepancies more, some of that floating away from the main piece is the checkerboard.

Screenshot 2023-04-07 at 7 33 20 AM

from depthai-experiments.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.