Git Product home page Git Product logo

sift3d's Issues

Adjust the coordinates to the base octave

The points are being drawn correctly, however in CSV the correction was missing.
In file sift.c, replace the lines 3120 to 3130 with:

    // Write the keypoints 
    for (i = 0; i < num_rows; i++) {

            const Keypoint *const key = kp->buf + i;
            const Mat_rm *const R = &key->R;
            
            // Adjust the coordinates to the base octave
            const double coord_factor = pow(2.0, key->o);

            // Write the coordinates 
            SIFT3D_MAT_RM_GET(&mat, i, kp_x, double) = coord_factor * key->xd +1;
            SIFT3D_MAT_RM_GET(&mat, i, kp_y, double) = coord_factor * key->yd +1;
            SIFT3D_MAT_RM_GET(&mat, i, kp_z, double) = coord_factor * key->zd +1;
            SIFT3D_MAT_RM_GET(&mat, i, kp_s, double) = key->sd;

Installation on Ubuntu 20.04

Hello,

I would like to thank you for the implementation first!

Issue:

After running the dependencies installation command:

sudo apt-get install zlib1g-dev liblapack-dev libdcmtk-dev libnifti-dev

I tried to install the SIFT3D-1.4.6-Ubuntu-16.04.deb

sudo dpkg -i SIFT3D-1.4.6-Ubuntu-16.04.deb

  Selecting previously unselected package sift3d.
  (Reading database ... 353068 files and directories currently installed.)
  Preparing to unpack SIFT3D-1.4.6-Ubuntu-16.04.deb ...
  Unpacking sift3d (1.4.6) ...
  dpkg: dependency problems prevent configuration of sift3d:
   sift3d depends on libdcmtk5; however:
    Package libdcmtk5 is not installed.

  dpkg: error processing package sift3d (--install):
   dependency problems - leaving unconfigured
  Errors were encountered while processing:
   sift3d

I ran sudo apt-get install -y libdcmtk-dev and got:

  Reading package lists... Done
  Building dependency tree       
  Reading state information... Done
  libdcmtk-dev is already the newest version (3.6.4-2.1build2).
  You might want to run 'apt --fix-broken install' to correct these.
  The following packages have unmet dependencies:
   sift3d : Depends: libdcmtk5 but it is not installable

It claims that it is not installable, which is confirmed by running sudo apt-get install libdcmtk5 and getting:

  Reading package lists... Done
  Building dependency tree       
  Reading state information... Done
  Package libdcmtk5 is not available, but is referred to by another package.
  This may mean that the package is missing, has been obsoleted, or
  is only available from another source
  
  E: Package 'libdcmtk5' has no installation candidate

Is there a way to go around this?

Thank you!

Usage with videos?

Hey, thanks a lot for releasing this. I was wondering if it would be easy, hard or downright impossible to adapt your work to extract descriptors from greyscale videos, which are a 3D domain as well.

Would you mind giving me some pointers in the right direction? Thanks again!

Would like to try with CLI, but...

... the latest Ubuntu release has dependencies that are no longer in repositories (libnifti2, libdcmtk5)

... the win64 installer (1.4.5) only installs uninstall.exe, and no other executables. Is this because Windows OS prevents you from using these libraries from the command line?

... do you know of any efforts to make a Python wrapper?

Accurate keypoint localization

Hi, thanks for your excellent work and for sharing it!

I am using your algorithm on Matlab and it is working pretty well.

I am wondering that do you use 'Accurate keypoint localization' that is mentioned on the SIFT 2004 paper, or do you assign at
the location and scale of the central sample point just like in the SIFT 1999 paper?

check keypoint validity before extracting descriptors

New Matlab functionality will allow users to specify their own keypoints. So, the descriptor extraction function cannot assume the provided keypoints will be valid. Perform some basic checks before attempting descriptor extraction. If extracting in pyramid mode, convert invalid octaves and scale levels to the nearest available.

SIFT3D can run on win7 64,but can't run on win10 64?

hi,
I install sift3d with the .exe, and add it to path and add include,libs,dlls in Visual Studio settings,then run it in x64 environment,i can run the example code on win7 64,but the code is crashed on win10 64.what is wrong with is? i guess this is the problem of TDM-GCC-64 lib,can anyone know how to fix it.
thank you

function "rand_rows"

I am curious about the function rand_rows ,when it selecting enough number of random rows of groups of matching points to calculate an affine matrix by the function solve_system.
Why it remove most of rows instead of picking serveral rows?
Looking forward to your reply.
Thanks you!
image
image

build error on Ubuntu 14.04

All I did was the same as instructions in 'INSTALL_LINUX.md' except that I installed the dependency named libdcmtk2-dev instead of libdcmtk-dev. It failed when I compiled the 'SIFT3D' with cmake. Here are the errors:

screenshot from 2018-01-09 09 42 53

Issues uploading DICOM files

Hi, I'm having difficulties uploading DICOM files using imRead3D when using the MATLAB add-on. I'm working with a 3D ultrasound DICOM file that resulted in an 'unsupported datatype RGB24'. Additionally, I've tried to use some sample files online which all led to different errors such as 'tag not found' and 'inconsistent slice spacing'. I've had success using NIFTI file formats, but I need to figure out the correct format of DICOM files to use my actual data. I'm able to read in all of these DICOM files with MATLAB's dicomread correctly. Has anyone had success getting the code to work with their DICOM files? If so, is it possible to share an example of the DICOM file so I can try to match the formatting. I would greatly appreciate any help!

How rotation matrix is computed?

Hello! Thank you very much for your nice project!

I'm learning 3D-SIFT with your code. I run it by a script in matlab while refering to C. But I can't quite find how the 3*3 rotation matrix is computed for each keypoint. I noticed:
Keypoint *const key = kp->buf + i; const Image *const level = SIFT3D_PYR_IM_GET(&sift3d->gpyr, key->o, key->s); Mat_rm *const R = &key->R; const Cvec vcenter = {key->xd, key->yd, key->zd}; const double sigma = ori_sig_fctr * key->sd;
in the function "static int assign_orientations(SIFT3D *const sift3d, Keypoint_store *const kp)" in sift.c.

Can you please give me some instructions on how &key->R is computed?
Thanks a lot!

about matlab

hi, I work on linux.
When cmake, I met the following warning:
CMake Warning at imutil/CMakeLists.txt:244 (add_library):

Cannot generate a safe runtime search path for target meximutil because
files in some directories may conflict with libraries in implicit
directories:

runtime library [libtiff.so.5] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
  /usr/local/MATLAB/R2014b/bin/glnxa64
runtime library [libpng12.so.0] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
  /usr/local/MATLAB/R2014b/bin/glnxa64
runtime library [libssl.so.1.0.0] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
  /usr/local/MATLAB/R2014b/bin/glnxa64
runtime library [libcrypto.so.1.0.0] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
  /usr/local/MATLAB/R2014b/bin/glnxa64
runtime library [libicuuc.so.52] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
  /usr/local/MATLAB/R2014b/bin/glnxa64
runtime library [libicudata.so.52] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
  /usr/local/MATLAB/R2014b/bin/glnxa64

Some of these libraries may not be found correctly.
-- Generating done

It seems that it is related to matlab.

When make, error happened:

[ 2%] Building C object imutil/CMakeFiles/meximutil.dir/imutil.c.o
[ 4%] Building C object imutil/CMakeFiles/meximutil.dir/nifti.c.o
[ 6%] Building CXX object imutil/CMakeFiles/meximutil.dir/dicom.cpp.o
[ 9%] Linking CXX shared library ../lib/wrappers/matlab/libmeximutil.so
/usr/bin/ld: /usr/local/lib/libofstd.a(offile.cc.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
/usr/local/lib/libofstd.a: error adding symbols: Bad value
collect2: error: ld returned 1 exit status
make[2]: *** [lib/wrappers/matlab/libmeximutil.so] Error 1
make[1]: *** [imutil/CMakeFiles/meximutil.dir/all] Error 2
make: *** [all] Error 2

How to solve this problem?
Thank you very much.

Matlab Mex functions

Dear Blaine,

Interesting work! I just ran into a problem on Matlab when getting started. I followed the installing instructions from source on Mac and tried to test the examples. It seems that the mex files (such as mexImRead3D.c) are not compiled after running setupSift3D.m: "Unrecognized function or variable 'mexImRead3D'".

Did I miss anything? I am only familiar with Matlab :)

Thank you!

Junhao

Usage in Visual Studio,Windows with C

Sorry to disturb.I just install it with the .exe, and add it to path and add include,libs,dlls in Visual Studio settings,then run it in x64 environment,but it says "access violation at address" in libgomp_64-1.Is there anything I do wrong in the steps above?Thanks.

Would SIFT3D work in multi modality registration - Heart MRI/XRay?

I am doing research on the registration of a 3D MRI volume and an X-Ray image of a heart.

I've looked into DRR's, segmentations, rigid body transforms, etc., but now I stumbled upon SIFT, and SIFT3D. To me, it seems that SIFT3D would short-circuit a lot of these problems, and result in much faster algorithms, and I would like my algorithm in near-real-time for new X-Ray images.

But before spending a lot of unnecessary effort, I want to validate if my naive-optimistic assumptions are correct:

  • key points can be detected in both X-Ray images and MRI volumes
  • the key points can be matched, even if the volume shapes and orientations are different
  • the key points can be matched, even if they are from different modalities (e.g. blood visibility is different between MRI and XRay), however, key points in transition between muscle and air could match more easily

Concerns:

  • the features/key points in MRI and X-ray are too different
  • key points blood/muscle will be mismatched to key points muscle/air
  • rotation inside the 3D matrix should be similar between the two images
  • 2D images can't be used to be matched to 3D volumes

Obviously, I can not expect full research from the investigators/readers, but a gut feeling or experiences from similar experiments are more than welcome.

interpolation of anisotropic images

The SIFT algorithms assume the image is isotropic. We should internally interpolate them to be so. Outputs, such as keypoint coordinates, should still be in the space of the original image. Possible fix: change all keypoint coordinates to real-word coordinates, converting them to image space before use.

General questions about SIFT3D outputs and usage

Dear Blaine,

I'm trying to motion correct a T1w EPI time-series, where the acquisition order of the slices is shuffled in each repetition, such that in each volume the slices have slightly different contrasts. As you can appreciate in the gif below, this change in contrast leads to an apparent "motion", characterized by a moving "nulling/dark band".

t1wEPI

I've tried using ANTs with MI as a cost function for motion-correction, but my results are never as accurate as I would like them to be. I suppose this is because methods based on image intensities are confounded by the apparent change in contrast.

Recently, when reading a blog post on registering camera and satellite images, I learned about SIFT and decided to try those ideas to my problem. That is how I discovered your work.

Nonetheless, I haven't been able to get SIFT3D to work so far, but I suppose it's because I'm not using the CLI tools correctly.

Here's what I've tried:

  1. Build SIFT3D with nifti support
  2. Try registering two images with:
regSift3D --matches matches.csv \
          --warped warped.nii \
          --keys keys.nii.gz \
          --transform transform.csv \
          src.nii ref.nii

My output warped.nii looks wrong. Viewing it with freeview gives me a warning that the sform and qform of the warped.nii are incorrect, so I don't know whether the registration failed, or whether the nifti output is wrong.

  1. I tried looking at transform.csv and figuring out whether I could use the values there to apply the transformation using AntsApplyTransforms.

The values in transform.csv look OK:

1.003655,0.006255,-0.005859,-0.649355
0.001542,1.000908,0.001695,-0.199589
-0.000418,-0.007386,1.009908,0.267528

I assume the first three columns represent a rotation matrix and the last column the translation coefficients. Is that correct?
Are the rotations computed with respect to the center of mass or the center of the image? Would you know the correct way to convert that output to ITK format?

Finally, regarding the SIFT parameters, in your paper you cite the original SIFT work as a starting point to gain intuition about them, but from your experience which parameters matter most for accurately defining keypoints in brain MR images?

Thank you for sharing your work!

Daniel

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.