I'm totally novice in pylearn2 & right now I'm working in Brats database in which we work on 3D MRI of brain for tumor segmentation by using Pylearn2 same as explained in pylearn2 tutorial for CIFAR10 Database .
My problem is that all the volumetric images in database is in .mha format and in order to use Pylearn2-CNN I must have either .pkl file or the binary files for the image database. "Image" module can't read .mha file.
Can anybody tell me how to work with .mha files in Pylearn2 and how to generate .pkl file for .mha files.
You could try converting your files from .mha to png and then making a .pkl file.
Related
I uploaded about a 3GB .DAT file into vim. The file contains .DAT file in binary and others in the following language:
"0000030801549200000308015492 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000109500010957REG0001095REGIPY 1989010100010101Y99991231N YYQ REG R"
I am trying to decipher that raw data into a format that I can use and understand using VIM. Does anyone know how I would do this? Or could point me in the direction to solve this problem? This concept is totally new to me and I am just trying to figure out how to get it done.
I am running a script to extract the EXIF data from a list of images in a folder that are imported from an iPhone using Python's pillow:
from PIL import Image
image = Image.open(path)
But before anything, some of the pictures need to be converted from iOS' format .HEIC to .jpg. I successfully managed to do so but when I try to open the image that was converted I get the following:
PIL.UnidentifiedImageError: cannot identify image file '.../pictures/IMG_4294.jpg'
See this image comparing the info of two files. The one on the left was converted from .HEIC to .jpg and doesn't work. The one on the right is originally a .jpg and works just fine.
Any thoughts on how I can solve this?
I am writing a program in windows (C#) to extract disk images from AOSP. I am using simg2img, but to no avail. Simg2img only supports EXT4 based file systems and some of my IMG files are written in F2FS. How do I extract these files? I have been struck with this problem for weeks if anyone can give any direction it would be helpful!
I want to open my 3D point cloud in MATLAB. But they are in .las files. How can I display them in MATLAB???
I heard about .ply file can open 3D point data on MATLAB. So I want to know how to convert las files to ply files.
There is a .las file reader for matlab here:
https://es.mathworks.com/matlabcentral/fileexchange/48073-lasdata
Once you have the data in matlab you can use these point cloud tools, which are part of the computer vision toolbox:
https://es.mathworks.com/help/vision/3-d-point-cloud-processing.html
If you want to embrace the open source force, I'm writing a Python (easy transition from matlab) library for point cloud processing:
https://github.com/daavoo/pyntcloud
You can use the free and open-source CloudCompare software.
On the command line:
CloudCompare -O file_to_convert.las -C_EXPORT_FMT PLY -SAVE_CLOUDS
Take care to the order of the options: it seems that -SAVE_CLOUDS must be at the end.
That will result in a binary-format PLY file in the same directory as the file to convert, named using the original filename and the date of export, like: file_to_convert_2019-07-18_13h32_06_751.ply
I found no way to specify the output file name (should you find one please comment below).
Should you want a more predictable name, add option -NO_TIMESTAMP before the option -SAVE_CLOUDS (but then you risk overwriting files so be careful).
More help (such as how to export in ASCII-format) in the documentation.
I timed this on powerful PC, it took 170s to convert a 2.7GB LAS file with 102M points (XYZ,intensity,time).
if you have LAStools installed, you can use las2txt to convert your *.las/*.laz files into *.xyz format which MeshLab can import natively as a point cloud, which may then be converted into a Mesh.
There are a multitude of caveats to that depending on the source of your data-set.
I need to convert my SFF file to PDF, then i need verify the document. i.e SFF file and converted file.
For that, I think to convert SFF file to image file and PDF file to image file.
Then comparing the both file using image processing.
To do this method:
Im searching for a program to convert SFF to BMP
Does anyone know such a program or has another idea how to do the job?
Thank you in advance...
Looks like you need reaConvertor. It appears to be a matured tool you can rely on. There is an online version of the tool here
I think:
https://github.com/Sonderstorch/sfftools
will do what you need (convert sff -> tiff/jpeg/..) and then you can use imageMagic (for example) to go to PDF.
Clearly not a current well used image format, however if you have legacy.sff Structured Fax Format, they are similar (not exactly identical) to a Monochrome G4 format.
By far the simplest programmable method to convert is using IrfanView which can Read Modify and Resave as other formats in batches.
Out put can be any other modern image type including Mono.BMP, G4.fax or as PDF (with or without GhostScript)