MHH AUTO
Python Script to convert SMR-D to CBF - Printable Version

+- MHH AUTO (https://mhhauto.com)
+-- Forum: MHH AUTO FORUMS. (https://mhhauto.com/Forum-MHH-AUTO-FORUMS)
+--- Forum: General Automotive Help & Discussions. (https://mhhauto.com/Forum-General-Automotive-Help-Discussions)
+---- Forum: Daimler Group Mercedes-Benz, Smart Discussions. (https://mhhauto.com/Forum-Daimler-Group-Mercedes-Benz-Smart-Discussions)
+---- Thread: Python Script to convert SMR-D to CBF (/Thread-Python-Script-to-convert-SMR-D-to-CBF)



Python Script to convert SMR-D to CBF - chris966 - 06-22-2023

Hi All

I have made a script to convert SMR-D files to cbf with Python and the help of Chat GPT any wizards fancy testing this out?

I assume this will allow a lot of guys to work in vediamo 4 instead of having to use DTS Monaco?

I have tested myself and it gives  CRC error in vediamo someone with a bit more knowledge can finish this if they can correct the formatting so vediamo understands it?

I have also converted a CBF in .JSON so the cbf is readable

Come on Team MHH lets do this!


RE: Python Script to convert SMR-D to CBF - gcs190 - 06-22-2023

Check the CRC of the files once converted to CBF, it should always be FFFFFFFF.


RE: Python Script to convert SMR-D to CBF - bingo1309 - 06-22-2023

If you try SMR-F decompile and recompile let me know. I am very much interested in this.


RE: Python Script to convert SMR-D to CBF - Siwecki - 06-23-2023

I wish it was that easy as you expect


Python Script to convert SMR-D to CBF - AndyTech - 06-23-2023

"Come on Team MHH lets do this!"

The last time someone said this developed vgs manager with the help of members and put a price on it afterwards but now we live different economical times where I don't think people are interested to work and at home they don't have enough food or money to buy clothes or bread and someone else will be selling there work on aliexpress.

I'm not saying that you will do such thing but that the fact that there isn't much interest into working on developing newer things because everything is for free posted publicly and everybody doesn't get there share and businesses has gone downhill and people think like this: " If there isn't money coming from developing new things, then why develop? Just leave it be and move one, everyone has to pay bills and make money so why bother with something that doesn't pay the bills "


RE: Python Script to convert SMR-D to CBF - chris966 - 06-24-2023

(06-23-2023, 04:37 AM)AndyTech Wrote: "Come on Team MHH lets do this!"

The last time someone said this developed vgs manager with the help of members and put a price on it afterwards but now we live different economical times where I don't think people are interested to work and at home they don't have enough food or money to buy clothes or bread and someone else will be selling there work on aliexpress.

I'm not saying that you will do such thing but that the fact that there isn't much interest into working on developing newer things because everything is for free posted publicly and everybody doesn't get there share and businesses has gone downhill and people think like this: " If there isn't money coming from developing new things,  then why develop? Just leave it be and move one, everyone has to pay bills and make money so why bother with something that doesn't pay the bills "




Fair point that wasn't my intentions in honesty it was to save people money buying different adapters to work in vediamo 5 etc. but i get your point



RE: Python Script to convert SMR-D to CBF - LightWorker - 06-24-2023

I tried the code, and made serveral changes to make it "work"
For Converting SMR-D you need 'Depth' 'Height' and 'Width
Code:
def convert_smrd_to_cbf(smr_d_file, cbf_file):     # Read the .smr-d file     smr_d_data = np.fromfile(smr_d_file, dtype=np.float32)         # Perform necessary data processing here     depth = 50  # Replace with the appropriate depth of your data     height = 200  # Replace with the appropriate height of your data     width = 150  # Replace with the appropriate width of your data         total_elements = depth * height * width     if smr_d_data.size != total_elements:         print("Error: Cannot reshape array to the desired dimensions.")         return         smr_d_data = smr_d_data.reshape((depth, height, width))         # Rest of the code remains the same...

To find the right Values you need to exract it from Metadata if posible or from file Dokumentation.
I made a code which extract these value, but Daimler SMR-D files are NOT reconized as MRC-File