tudelft3d / SUMS-Semantic-Urban-Mesh-Segmentation-public

SUMS: Semantic Urban Mesh Segmentation.
GNU General Public License v3.0
56 stars 14 forks source link

How to merge many texture files of samll tiles to one big texture file #9

Closed ziwenjie closed 2 years ago

ziwenjie commented 2 years ago

Hi authors: My data are many small tiles, so I got many small texture files. And small ply-model is hard to label. So I want to combine small ply-models to a big ply-model. I combine the small ply-model to a big ply-model, but the number of texture file still keep unchanged. My ply data like:

ply
format ascii 1.0
comment VCGLIB generated
comment TextureFile Tile_+007_+006_L21_0000011_0.jpg
comment TextureFile Tile_+007_+006_L21_0000010_0.jpg
comment TextureFile Tile_+007_+006_L21_0000001_0.jpg
comment TextureFile Tile_+007_+006_L21_0000000_0.jpg
comment TextureFile Tile_+007_+005_L21_0000012_0.jpg
comment TextureFile Tile_+007_+005_L21_0000001_0.jpg
comment TextureFile Tile_+007_+005_L21_0000000_0.jpg
comment TextureFile Tile_+007_+004_L21_0000012_0.jpg
comment TextureFile Tile_+007_+004_L21_0000011_0.jpg
comment TextureFile Tile_+007_+004_L21_0000010_0.jpg
comment TextureFile Tile_+007_+004_L21_0000001_0.jpg
comment TextureFile Tile_+007_+003_L21_0000013_0.jpg
comment TextureFile Tile_+007_+003_L21_0000011_0.jpg
comment TextureFile Tile_+007_+003_L21_0000010_0.jpg
comment TextureFile Tile_+007_+003_L21_0000002_0.jpg
comment TextureFile Tile_+007_+003_L21_0000001_0.jpg
comment TextureFile Tile_+007_+002_L21_0000013_0.jpg
comment TextureFile Tile_+007_+002_L21_0000012_0.jpg
comment TextureFile Tile_+007_+002_L21_0000011_0.jpg

There are so many texture files. I use your release tool to segment my data I got

RPly: Out of memery
RPly: Unexpected token 'TextureFile Tile_......jpg'
failed to read ply header

Thanks. Sincerely.

WeixiaoGao commented 2 years ago

Hi, I have updated the buffer size in rply, but not the executable, so you might need to build your own for now. For processing small tiles you can adjust the "batch processing parameters" in config.txt. It allows you to merge small tiles during processing without having to do it yourself. You can adjust 'batch_size' and 'sub_batch_size' to determine the number of tiles you want to merge. The merge is based on the filename, so there is no guarantee that it will handle all types of tiles with a particular name. For more information about the settings, please refer to here.

ziwenjie commented 2 years ago

Hi, I have updated the buffer size in rply, but not the executable, so you might need to build your own for now. For processing small tiles you can adjust the "batch processing parameters" in config.txt. It allows you to merge small tiles during processing without having to do it yourself. You can adjust 'batch_size' and 'sub_batch_size' to determine the number of tiles you want to merge. The merge is based on the filename, so there is no guarantee that it will handle all types of tiles with a particular name. For more information about the settings, please refer to here.

Thanks for your reply. Due to a lot of textures, the SUMS-Semantic-Urban-Mesh-Segmentation still got the error

RPly: Out of memery
RPly: Unexpected token 'TextureFile Tile_......jpg'
failed to read ply header
Segmentation fault (core dumped)

The data of SUM Helsinki 3D all are a big ply flie with one texture map. My data are a big ply file with many texure maps , maybe 600+, and I want to combine the texture maps into whole one like you. Would you help me create the same type data ? What is more, I found that you data are generate by CGAL. Howerver, I still can not generate the big ply file with one texture map. Would you tell me how to generate the same type data like yours.

WeixiaoGao commented 2 years ago

I'm curious why you have such large ply data with lots of texture maps? What software do you use to generate them? Typically, a single ply file (especially for urban scenes) does not have more than 100 texture maps, otherwise it will be very inefficient. Do you merge the smaller ply data into larger ones yourself or are they generated directly by the reconstruction software?

For the SUM data we use, they are generated directly by Bentley ContextCapture. So we didn't do any merging of the texture or ply data. The reason you saw CGAL in the header is because we use it to convert OBJ to PLY format.

I am not aware if there is any algorithm that can be used to merge texture maps directly. If your original input ply data covers a small area with several texture maps, you could use batch processing. Otherwise, you may need to regenerate the ply data with fewer texture maps.

ziwenjie commented 2 years ago

Thanks for your reply. The ply-file with many texture maps is generated by merging the many smaller ply data. Then I got a series problems. Yours, sincerely.