Reputation: 31
I'm having issues to create an image database (.imgdb) for my arcore project. I've downloaded arcore sdk for android and inside the folder tools there's arcoreimg for mac. When i try to follow the steps in here:
https://developers.google.com/ar/develop/c/augmented-images/arcoreimg
the following is not working:
./arcoreimg build-db --input_image_list_path=/path/to/image_list_file.txt \
--output_db_path=/path/to/myimages.imgdb
(changing the path to my images obviously)
It says arcoreimg command not found when i execute it in the Terminal. What should i do? Any ideas?
Upvotes: 3
Views: 4033
Reputation: 18406
Step 1: Give read/write access to your tool. Open your arcoreimg directory from terminal. And give following command
sudo chmod +x arcoreimg
Step 2: Copy your images in one folder
Step 3: Create one empty output folder
Step 4: Give following command
./arcoreimg build-db --input_images_directory="yourInputDirectoryPath" --output_db_path="yourOutputDirectoryPath/databaseName.imgdb"
Sample command
./arcoreimg build-db --input_images_directory=/Users/ranjithkumar/Desktop/input_images --output_db_path=/Users/ranjithkumar/Desktop/output_db/myImages.imgdb
Upvotes: 1
Reputation: 183
The official documentation doesn't point to the right steps.
First, locate the arcoreimg
file on your system. On MacOS, I found it inside <arcore-sdk-location</arcore-android-sdk/tools/arcoreimg/macos
.
You can use the executable directly from here, or copy it to a more convenient location (maybe next to your images).
I copied it next to my images, opened the terminal in the folder, and then used the eval-img
command, but the build db command should work the same way-
./arcoreimg eval-img --input_image_path=dog.jpg
This might give permission denied
or command not found
.
sudo chmod +x arcoreimg
should fix this.
Upvotes: 1
Reputation: 373
I believe the official documentation on using this may not be very clear, as this portion ./arcoreimg
of the sample code refers to the exact directory where your arcoreimage cli tool is located, as well as the name it is called. So you may correctly run the code like this;
/Users/.../GoogleARCore/CLI/augmented_image_cli_osx build-db --input_image_list_path=/path/to/image_list_file.txt \
--output_db_path=/path/to/myimages.imgdb
Upvotes: 0
Reputation: 293
Had the same problem, making the file executable fixed the problem for me:
sudo chmod +x arcoreimg
Upvotes: 9