Skip to main content
added 34 characters in body
Source Link
yode
  • 27.2k
  • 4
  • 66
  • 174

I am trying to make an "ostagram" like image using wavelet transforms and image keypoints.

See the following link: https://www.facebook.com/ostagram/

This is done using neural networks, which I at present am not sure how to implement in Mathematica.

What I am trying to do is the following:

  1. Import two images of the same size and type:

     testImage1 = Import["https://i.sstatic.net/TQnFX.jpg"];
     testImage2 = Import["https://i.sstatic.net/JAVdX.jpg"];
    
  2. Segment one image using ImageKeypoints with a specific size (in this case 25x25 px) of partitions:

     ImageSegment[img_, param_] :=
       Module[{i = img, p = param}, 
         ImageTrim[i, {#}, p] & /@ ImageKeypoints[i, "KeypointStrength" -> .001]
        ];
     n = ImageSegment[testImage1, 25];
    
  3. Use the wavelet transform on one image so that I can extract the detail coefficients and reassemble them into one image:

(takes the wavelet transform of the second image)

dwd = StationaryWaveletTransform[testImage2, CDFWavelet[], 3];

(only keeps detail coefficients)

detail = InverseWaveletTransform[dwd, Automatic, {___, 1 | 2 | 3}];
Binarize@detail

Now, how do I get the segmented images from the first image overlaid on the detailed wavelet coefficients to produce those cool images from the link?

Thanks for your help

I am trying to make an "ostagram" like image using wavelet transforms and image keypoints.

See the following link: https://www.facebook.com/ostagram/

This is done using neural networks, which I at present am not sure how to implement in Mathematica.

What I am trying to do is the following:

  1. Import two images of the same size and type:

     testImage1 = Import["https://i.sstatic.net/TQnFX.jpg"];
     testImage2 = Import["https://i.sstatic.net/JAVdX.jpg"];
    
  2. Segment one image using ImageKeypoints with a specific size (in this case 25x25 px) of partitions:

     ImageSegment[img_, param_] :=
       Module[{i = img, p = param}, 
         ImageTrim[i, {#}, p] & /@ ImageKeypoints[i, "KeypointStrength" -> .001]
        ];
     n = ImageSegment[testImage1, 25];
    
  3. Use the wavelet transform on one image so that I can extract the detail coefficients and reassemble them into one image:

(takes the wavelet transform of the second image)

dwd = StationaryWaveletTransform[testImage2, CDFWavelet[], 3];

(only keeps detail coefficients)

detail = InverseWaveletTransform[dwd, Automatic, {___, 1 | 2 | 3}];
Binarize@detail

Now, how do I get the segmented images from the first image overlaid on the detailed wavelet coefficients to produce those cool images from the link?

Thanks for your help

I am trying to make an "ostagram" like image using wavelet transforms and image keypoints.

See the following link: https://www.facebook.com/ostagram/

This is done using neural networks, which I at present am not sure how to implement in Mathematica.

What I am trying to do is the following:

  1. Import two images of the same size and type:

     testImage1 = Import["https://i.sstatic.net/TQnFX.jpg"];
     testImage2 = Import["https://i.sstatic.net/JAVdX.jpg"];
    
  2. Segment one image using ImageKeypoints with a specific size (in this case 25x25 px) of partitions:

     ImageSegment[img_, param_] :=
       Module[{i = img, p = param}, 
         ImageTrim[i, {#}, p] & /@ ImageKeypoints[i, "KeypointStrength" -> .001]
        ];
     n = ImageSegment[testImage1, 25];
    
  3. Use the wavelet transform on one image so that I can extract the detail coefficients and reassemble them into one image:

(takes the wavelet transform of the second image)

dwd = StationaryWaveletTransform[testImage2, CDFWavelet[], 3];

(only keeps detail coefficients)

detail = InverseWaveletTransform[dwd, Automatic, {___, 1 | 2 | 3}];
Binarize@detail

Now, how do I get the segmented images from the first image overlaid on the detailed wavelet coefficients to produce those cool images from the link?

Thanks for your help

edited tags
Source Link
yode
  • 27.2k
  • 4
  • 66
  • 174

I am trying to make an "ostagram" like image using wavelet transforms and image keypoints.

See the following link: https://www.facebook.com/ostagram/

This is done using neural networks, which I at present am not sure how to implement in Mathematica.

What I am trying to do is the following:

  1. Import two images of the same size and type:

     testImage1 = Import["/Users/xxx/DocumentsImport["https:/final_project/imagesi.sstatic.net/800_600_1TQnFX.jpg"];
     testImage2 = Import["/Users/xxx/DocumentsImport["https:/final_project/imagesi.sstatic.net/800_600_2JAVdX.jpg"];
    
  2. Segment one image using ImageKeypoints with a specific size (in this case 25x25 px) of partitions:

     ImageSegment[img_, param_] :=
       Module[{i = img, p = param}, 
         ImageTrim[i, {#}, p] & /@ ImageKeypoints[i, "KeypointStrength" -> .001]
        ];
     n = ImageSegment[testImage1, 25];
    
  3. Use the wavelet transform on one image so that I can extract the detail coefficients and reassemble them into one image:

(takes the wavelet transform of the second image)

dwd = StationaryWaveletTransform[testImage2, CDFWavelet[], 3];

(only keeps detail coefficients)

detail = InverseWaveletTransform[dwd, Automatic, {___, 1 | 2 | 3}];
Binarize@detail

Now, how do I get the segmented images from the first image overlaid on the detailed wavelet coefficients to produce those cool images from the link?

Thanks for your help

I am trying to make an "ostagram" like image using wavelet transforms and image keypoints.

See the following link: https://www.facebook.com/ostagram/

This is done using neural networks, which I at present am not sure how to implement in Mathematica.

What I am trying to do is the following:

  1. Import two images of the same size and type:

     testImage1 = Import["/Users/xxx/Documents/final_project/images/800_600_1.jpg"];
     testImage2 = Import["/Users/xxx/Documents/final_project/images/800_600_2.jpg"];
    
  2. Segment one image using ImageKeypoints with a specific size (in this case 25x25 px) of partitions:

     ImageSegment[img_, param_] :=
       Module[{i = img, p = param}, 
         ImageTrim[i, {#}, p] & /@ ImageKeypoints[i, "KeypointStrength" -> .001]
        ];
     n = ImageSegment[testImage1, 25];
    
  3. Use the wavelet transform on one image so that I can extract the detail coefficients and reassemble them into one image:

(takes the wavelet transform of the second image)

dwd = StationaryWaveletTransform[testImage2, CDFWavelet[], 3];

(only keeps detail coefficients)

detail = InverseWaveletTransform[dwd, Automatic, {___, 1 | 2 | 3}];
Binarize@detail

Now, how do I get the segmented images from the first image overlaid on the detailed wavelet coefficients to produce those cool images from the link?

Thanks for your help

I am trying to make an "ostagram" like image using wavelet transforms and image keypoints.

See the following link: https://www.facebook.com/ostagram/

This is done using neural networks, which I at present am not sure how to implement in Mathematica.

What I am trying to do is the following:

  1. Import two images of the same size and type:

     testImage1 = Import["https://i.sstatic.net/TQnFX.jpg"];
     testImage2 = Import["https://i.sstatic.net/JAVdX.jpg"];
    
  2. Segment one image using ImageKeypoints with a specific size (in this case 25x25 px) of partitions:

     ImageSegment[img_, param_] :=
       Module[{i = img, p = param}, 
         ImageTrim[i, {#}, p] & /@ ImageKeypoints[i, "KeypointStrength" -> .001]
        ];
     n = ImageSegment[testImage1, 25];
    
  3. Use the wavelet transform on one image so that I can extract the detail coefficients and reassemble them into one image:

(takes the wavelet transform of the second image)

dwd = StationaryWaveletTransform[testImage2, CDFWavelet[], 3];

(only keeps detail coefficients)

detail = InverseWaveletTransform[dwd, Automatic, {___, 1 | 2 | 3}];
Binarize@detail

Now, how do I get the segmented images from the first image overlaid on the detailed wavelet coefficients to produce those cool images from the link?

Thanks for your help

Tweeted twitter.com/StackMma/status/704927580894470144
added 56 characters in body
Source Link
march
  • 24.2k
  • 2
  • 46
  • 102

I am trying to make an "ostagram" like image using wavelet transforms and image keypoints.

See the following link: https://www.facebook.com/ostagram/

This is done using neural networks, which I at present am not sure how to implement in Mathematica.

What I am trying to do is the following:

  1. Import two images of the same size and type:

    testImage1 = Import["/Users/xxx/Documents/final_project/images/800_600_1.jpg"]; testImage2 = Import["/Users/xxx/Documents/final_project/images/800_600_2.jpg"];

     testImage1 = Import["/Users/xxx/Documents/final_project/images/800_600_1.jpg"];
     testImage2 = Import["/Users/xxx/Documents/final_project/images/800_600_2.jpg"];
    
  2. Segment one image using ImageKeypointsImageKeypoints with a specific size (in this case 25x25 px) of partitions:

     ImageSegment[img_, param_] :=
       Module[{i = img, p = param}, 
         ImageTrim[i, {#}, p] & /@ ImageKeypoints[i, "KeypointStrength" -> .001]
        ];
     n = ImageSegment[testImage1, 25];
    
  3. Use the wavelet transform on one image so that I can extract the detail coefficients and reassemble them into one image:

ImageSegment[img_, param_] := Module[{i = img, p = param}, ImageTrim[i, {#}, p] & /@ ImageKeypoints[i, "KeypointStrength" -> .001]]; n = ImageSegment[testImage1, 25];

  1. Use the wavelet transform on one image so that I can extract the detail coefficients and reassemble them into one image:

(takes the wavelet transform of the second image)

dwd = StationaryWaveletTransform[testImage2, CDFWavelet[], 3];

dwd = StationaryWaveletTransform[testImage2, CDFWavelet[], 3];

(only keeps detail coefficients)

detail = InverseWaveletTransform[dwd, Automatic, {___, 1 | 2 | 3}];

Binarize@detail

detail = InverseWaveletTransform[dwd, Automatic, {___, 1 | 2 | 3}];
Binarize@detail

Now, how do I get the segmented images from the first image overlaid on the detailed wavelet coefficients to produce those cool images from the link?

Thanks for your help

I am trying to make an "ostagram" like image using wavelet transforms and image keypoints.

See the following link: https://www.facebook.com/ostagram/

This is done using neural networks, which I at present am not sure how to implement in Mathematica.

What I am trying to do is the following:

  1. Import two images of the same size and type:

    testImage1 = Import["/Users/xxx/Documents/final_project/images/800_600_1.jpg"]; testImage2 = Import["/Users/xxx/Documents/final_project/images/800_600_2.jpg"];

  2. Segment one image using ImageKeypoints with a specific size (in this case 25x25 px) of partitions:

ImageSegment[img_, param_] := Module[{i = img, p = param}, ImageTrim[i, {#}, p] & /@ ImageKeypoints[i, "KeypointStrength" -> .001]]; n = ImageSegment[testImage1, 25];

  1. Use the wavelet transform on one image so that I can extract the detail coefficients and reassemble them into one image:

(takes the wavelet transform of the second image)

dwd = StationaryWaveletTransform[testImage2, CDFWavelet[], 3];

(only keeps detail coefficients)

detail = InverseWaveletTransform[dwd, Automatic, {___, 1 | 2 | 3}];

Binarize@detail

Now, how do I get the segmented images from the first image overlaid on the detailed wavelet coefficients to produce those cool images from the link?

Thanks for your help

I am trying to make an "ostagram" like image using wavelet transforms and image keypoints.

See the following link: https://www.facebook.com/ostagram/

This is done using neural networks, which I at present am not sure how to implement in Mathematica.

What I am trying to do is the following:

  1. Import two images of the same size and type:

     testImage1 = Import["/Users/xxx/Documents/final_project/images/800_600_1.jpg"];
     testImage2 = Import["/Users/xxx/Documents/final_project/images/800_600_2.jpg"];
    
  2. Segment one image using ImageKeypoints with a specific size (in this case 25x25 px) of partitions:

     ImageSegment[img_, param_] :=
       Module[{i = img, p = param}, 
         ImageTrim[i, {#}, p] & /@ ImageKeypoints[i, "KeypointStrength" -> .001]
        ];
     n = ImageSegment[testImage1, 25];
    
  3. Use the wavelet transform on one image so that I can extract the detail coefficients and reassemble them into one image:

(takes the wavelet transform of the second image)

dwd = StationaryWaveletTransform[testImage2, CDFWavelet[], 3];

(only keeps detail coefficients)

detail = InverseWaveletTransform[dwd, Automatic, {___, 1 | 2 | 3}];
Binarize@detail

Now, how do I get the segmented images from the first image overlaid on the detailed wavelet coefficients to produce those cool images from the link?

Thanks for your help

Source Link
Vink
  • 151
  • 1
  • 6
Loading