Skip to main content

Finding Cuboid and Sphere in 3D Image and 2D image

Project description

Setup

  1. Pre Requirements:

    • Install Docker: Link
    • Install Docker Compose: pip install docker-compose
  2. Setup Docker:

    # Build docker
    docker-compose up -d
    
    # OR
    
    # Pull prebuilt docker
    docker pull bendang/cuboid_sphere &&  docker-compose up -d
    
  3. Install package:

    pip install cuboid-sphere
    

Test

from cuboid_sphere import call_2d, call_3d, display_2d_result, display_3d_result, save_point_cloud

# if docker hosted locally
# ip = 1.2.3.4  
ip = "localhost" 

# Port based on docker compose settings
port = "8888"

# Task 1
# hdf5_path = "/PATH/TO/HDF5_FILE.hdf5"
hdf5_path = 'test_data/cuboid-sphere.hdf5'
result = call_3d(hdf5_path, ip=ip, port=port)
save_point_cloud(result["point_cloud"], "/PATH/TO/SAVE.hdf5") # saving Point Cloud 
display_3d_result(hdf5_path, result) # display volume, surface area, centroid and depth map


# Task 2
# image_path = "/PATH/TO/IMAGE.png"
image_path = "test_data/cuboid-sphere.png"
result = call_2d(image_path, ip=ip, port=port)
display_2d_result(image_path, result)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cuboid_sphere-0.1.0.tar.gz (9.2 kB view hashes)

Uploaded Source

Built Distribution

cuboid_sphere-0.1.0-py3-none-any.whl (12.1 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page