Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
I have a .mat file, called m1.mat, the size of which is 40*40*20 double.
The values in the m1.mat file is either 0 or 1. I want to convert this .mat file to NIFTI format by using Matlab? How to do it?
This package from MathWorks FEX seems to be what you're looking for: http://www.mathworks.com/matlabcentral/fileexchange/8797-tools-for-nifti-and-analyze-image . This package was written by Jimmy Shen from the Rotman Research Institute at Baycrest, which is affiliated with the University of Toronto in Canada.
However, to be self-contained, I'll provide you with some sample code to get started using this package.
Assuming your 3D matrix is stored in a variable called im, you would first need to build a NIfTI structure from the 3D matrix, and then you'd save the NIfTI structure.
Something like this:
nii_img = make_nii(im);
save_nii(nii_img, 'm1.nii');
Related
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 5 months ago.
Improve this question
Currently I started working on a personal project where you will constantly receive images, similar or not. Every new image received do I need to loop through absolutely every other image already saved to compare ssim?
The answer is No you can't recover the image from SSIM and Yes you'd have to loop over all images for comparison.
However you may look at image compression to have faster evaluation of the SSIM.
Some example images would be welcome for a better answer.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 1 year ago.
Improve this question
How is automatic image optimization performed? I'm looking for a general understanding or areas where I can read more into this, for example with the top image the bottom was automatically optimized using an image optimizing service within a few seconds.
In this example the saturation, brightness, hue and various other parameters are changed.
Original:
Optimized:
One possible method to produce a similar result is to convert to LAB colorspace, stretch the hisogram to full dynamic range separately for the L channel and the A and B channels (the same), then convert back to (s)RGB colorspace.
Input:
Output:
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 2 years ago.
Improve this question
I'm trying to open a .bin file in Matlab. The file is a xcat phantom of human body.
dims: 320,128,666
vxsize: 2.5,2.5,2.5
data type: 32-bit float, littleendian
And what I want is to open/see image of a specific slice of this file.
The XCAT phantom comes in raw format. Just use fopen, fread (with the precision flag set to the correct type) and fclose. Then you will likely need to reshape what fread returns.
Once you have the 3D image in MATLAB, then just slice it with indexes img(:,100,:)
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 3 years ago.
Improve this question
I want to plot data from multiple files to one page using xmgrace.
Example:
I have files name a.dat b.dat c.dat with data in two columns.
Now I want to plot the data from the *.dat files in different sub-plots using xmgrace. The Sub-plot Matrix is shown in the picture.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 3 years ago.
Improve this question
I want to use bag-of-word feature on image classification, and how to visualize the codebook?
I use keypoint-sift then kmeans to do clustering.
e.g., http://fias.uni-frankfurt.de/~triesch/courses/260object/papers/Fei-Fei_CVPR2005.pdf (figure 4)
The 174-word codebook is visualized by a patch. The paper mentioned they used two types of representation, one is 11*11 pixel patch and the other is SIFT descriptors. Fig 4 is a result based on the former presentation after a k-means clustering. They cannot visualize a codebook based on SIFT (a wired image as 174*128 ). Of course, we can get the closest SIFT in query and visualize a patch around corresponding keypoint. Hope it helps.