Extract Blob/Image from .e57 file

Please feel free to ask other members for help with certain projects
Post Reply
ScannerIRE
I have made 10-20 posts
I have made 10-20 posts
Posts: 15
Joined: Tue Apr 12, 2022 1:06 pm
1
Full Name: James Morrissey
Company Details: myself
Company Position Title: Software Dev
Country: Ireland
Has thanked: 3 times

Extract Blob/Image from .e57 file

Post by ScannerIRE »

I have a .e57 file that contains Images

I'm trying to extract some Images from a .e57 file


I've been doing research, on point 3.6 of this document http://paulbourke.net/dataformats/e57/2 ... e57-v3.pdf it mentions how the Image data can be extracted.

My question is, can someone recommend what tools to use and if there's and step bt step process ?

I've have currently spent days trying to extract data and the extracting the Images appears to be the most difficult.
I'm new to 'point-cloud' and I've spent a lot of hours looking into possibly converting the .e57 into a .laz or .las to possibly get the data

From my understanding there is someone that has definitely wanted to achieve the same goal.


Images appear to be stored as 'blobs' within the file

Extract from .pdf
The bulk of an E57 file will typically be encoded in the binary sections. There are two types of binary sections – Blob sections

Blob sections contain the binary portion of Blob E57 elements. This data is interpreted based on the context in which the Blob element is defined. For example, if the context of the Blob indicates that the data should be a JPEG image, then a reader would interpret the binary data as if it were a separate JPEG image file.

In the case of a Blob containing a JPEG image, all that would be needed is a library capable of reading a JPEG file as a data stream, and an E57 file reader could stream the relevant data to the JPEG reader and then return the resulting image.
User avatar
Scott.Warren
V.I.P Member
V.I.P Member
Posts: 364
Joined: Tue Jan 30, 2018 3:14 pm
6
Full Name: Scott Warren
Company Details: WSP Canada
Company Position Title: Project Manager - Geomatics Engineer
Country: Canada
Linkedin Profile: Yes
Location: Dartmouth, Nova Scotia, Canada
Has thanked: 44 times
Been thanked: 111 times
Contact:

Re: Extract Blob/Image from .e57 file

Post by Scott.Warren »

http://www.cloudcompare.org/forum/viewtopic.php?t=1787
^^ Cloudcompare might be your best bet. ^^

i don't think LAS/LAZ host images.

http://www.libe57.org/ <- e57 file information

Not all e57's contain images, not all software store the image into the e57 in the same way. there are many forum posts about people dealing with these issues, but I don't know that will be super helpful for your task.

Might be helpful to know what device/software was used to create the e57.
ScannerIRE
I have made 10-20 posts
I have made 10-20 posts
Posts: 15
Joined: Tue Apr 12, 2022 1:06 pm
1
Full Name: James Morrissey
Company Details: myself
Company Position Title: Software Dev
Country: Ireland
Has thanked: 3 times

Re: Extract Blob/Image from .e57 file

Post by ScannerIRE »

Thanks for your response, Scott!

I have used the tool 'e57xmldump' from libe57 and it was great for getting some data that I need.


I also used 'e572las.exe' and 'las2txt' from http://lastools.org to extract the point data to a nice readable format


ColudCompare is great, it has a nice feature called 'render to file' which I tried to use to get the image(s) been unfortunately it also captures the entire viewport too (screenshot attached to this post, I needed to crop the screenshot because only 1000 pixels wide and 1000 pixels high was allowed)

If it would only allow me to capture the Image it would be fantastic.


The Scanner used was Matterport, they have recently offered the e57 with their downloads:
https://matterport.com/blog/introducing-matterport-e57
You do not have the required permissions to view the files attached to this post.
badam
V.I.P Member
V.I.P Member
Posts: 916
Joined: Tue May 11, 2021 5:36 pm
2
Full Name: Adam Berta
Company Details: InnoScan 3D Hungary Kft
Company Position Title: unknown
Country: Hungary
Linkedin Profile: No
Has thanked: 52 times
Been thanked: 297 times
Contact:

Re: Extract Blob/Image from .e57 file

Post by badam »

ScannerIRE wrote: Thu Apr 14, 2022 1:59 pm Thanks for your response, Scott!

I have used the tool 'e57xmldump' from libe57 and it was great for getting some data that I need.


I also used 'e572las.exe' and 'las2txt' from http://lastools.org to extract the point data to a nice readable format


ColudCompare is great, it has a nice feature called 'render to file' which I tried to use to get the image(s) been unfortunately it also captures the entire viewport too (screenshot attached to this post, I needed to crop the screenshot because only 1000 pixels wide and 1000 pixels high was allowed)

If it would only allow me to capture the Image it would be fantastic.


The Scanner used was Matterport, they have recently offered the e57 with their downloads:
https://matterport.com/blog/introducing-matterport-e57
you can just click on the image in the Cloud Compare object tree and press save (ctrl+s) and you can save the image. if you want an automated way then you need to dig into libe57. it can be done, it needs a little bit more knowledge about C++, and programing, but it can be done in a day.
ScannerIRE
I have made 10-20 posts
I have made 10-20 posts
Posts: 15
Joined: Tue Apr 12, 2022 1:06 pm
1
Full Name: James Morrissey
Company Details: myself
Company Position Title: Software Dev
Country: Ireland
Has thanked: 3 times

Re: Extract Blob/Image from .e57 file

Post by ScannerIRE »

Thanks Adam !


I have made some progress

When you say you click on the image in the Cloud Compare object tree and press save (ctrl+s) and you can save the image.

I did the Ctrl+S but it was downloaded as a binary file (.bin)

Is some way to save/download it as a .png rather than a .bin file?


I was able to parse through the bin file using this script https://www.devdungeon.com/content/work ... tract-pngs

Which identified a .png in the .bin file and saved the image to a folder on my PC




Secondly when you mentioned
if you want an automated way then you need to dig into libe57. it can be done, it needs a little bit more knowledge about C++, and programing, but it can be done in a day.

I do ultimately intend to add automation, can you recommend any websites, libraries, or videos on how this automation would be achieved ?

I'm rather new to C++, Point Clouds, and Automation so any help similar to what you have already offered would be greatly welcomed.
badam
V.I.P Member
V.I.P Member
Posts: 916
Joined: Tue May 11, 2021 5:36 pm
2
Full Name: Adam Berta
Company Details: InnoScan 3D Hungary Kft
Company Position Title: unknown
Country: Hungary
Linkedin Profile: No
Has thanked: 52 times
Been thanked: 297 times
Contact:

Re: Extract Blob/Image from .e57 file

Post by badam »

ScannerIRE wrote: Fri Apr 15, 2022 5:13 pm Thanks Adam !


I have made some progress

When you say you click on the image in the Cloud Compare object tree and press save (ctrl+s) and you can save the image.

I did the Ctrl+S but it was downloaded as a binary file (.bin)

Is some way to save/download it as a .png rather than a .bin file?


I was able to parse through the bin file using this script https://www.devdungeon.com/content/work ... tract-pngs

Which identified a .png in the .bin file and saved the image to a folder on my PC




Secondly when you mentioned
if you want an automated way then you need to dig into libe57. it can be done, it needs a little bit more knowledge about C++, and programing, but it can be done in a day.

I do ultimately intend to add automation, can you recommend any websites, libraries, or videos on how this automation would be achieved ?

I'm rather new to C++, Point Clouds, and Automation so any help similar to what you have already offered would be greatly welcomed.
there is a file type selector during save in CC. You can select jpg, bmp, etc... (however you can only save only one image at a time)


on the libe57 site there are few examples. The exact solution will depend on how the e57 was written originally.
http://libe57.org/bestReader.html
ScannerIRE
I have made 10-20 posts
I have made 10-20 posts
Posts: 15
Joined: Tue Apr 12, 2022 1:06 pm
1
Full Name: James Morrissey
Company Details: myself
Company Position Title: Software Dev
Country: Ireland
Has thanked: 3 times

Re: Extract Blob/Image from .e57 file

Post by ScannerIRE »

Thanks I feel incredibly stupid that I didn't catch that one :shock:
ScannerIRE
I have made 10-20 posts
I have made 10-20 posts
Posts: 15
Joined: Tue Apr 12, 2022 1:06 pm
1
Full Name: James Morrissey
Company Details: myself
Company Position Title: Software Dev
Country: Ireland
Has thanked: 3 times

Re: Extract Blob/Image from .e57 file

Post by ScannerIRE »

badam wrote: Thu Apr 14, 2022 2:24 pm
ScannerIRE wrote: Thu Apr 14, 2022 1:59 pm Thanks for your response, Scott!
if you want an automated way then you need to dig into libe57. it can be done, it needs a little bit more knowledge about C++, and programing, but it can be done in a day.
Thanks Scott!
can you advise me on how libe57 is set up? your help would be greatly appreciated viewtopic.php?p=99548
thales
I have made <0 posts
I have made <0 posts
Posts: 1
Joined: Sat Jun 13, 2020 9:31 am
3
Full Name: Tim Payne
Company Details: Freelance
Company Position Title: Freelance
Country: UK

Re: Extract Blob/Image from .e57 file

Post by thales »

"you can just click on the image in the Cloud Compare object tree and press save (ctrl+s) and you can save the image."

Dialogue generated on attempting above, in CC

"Can't save selected entities in this way"...
Post Reply

Return to “Request Help With Projects”