Skip to main content
added 2 characters in body
Source Link
kglr
  • 400.5k
  • 18
  • 488
  • 929

I have a set of images which need to be filtered by different filters. So I have made an interface in which the user can choose his or her filter. However I now want to manipulate the degree of the filter. Meanfilter[imagedata, {1,2,3 etc.)]. I now have a working manipulate:

Manipulate[ArrayPlot[MedianFilter[imageDataOr, i]], {i, 0, 10, 1}]

but the image does not refresh when I use it in a graphical user interface. The code is:

outM = DialogInput[{
    TextCell["Adjust filter you want to use"],
    Row[{Manipulate[
       ArrayPlot[MedianFilter[imageDataOr, i]], {i, 0, 10, 1}]}],
    Button["Continue", DialogReturn[1]]}];

image=Import[httpsimage=Import["https://i.sstatic.net/Ekhbd.jpg];jpg"];
imageDataOr=ImageData[image]

 []

EDIT: You have to grayscale the image.

To be specific. When I use the slider everything works fine, but when I click on a specific point it does not refresh

The solution is now:

butOut = DialogInput[{
   TextCell["Choose the filter you want to use"], 
   Button["Median Filter", DialogReturn[1]]}];
If[butOut == 1, outM = DialogInput[{
    TextCell["Adjust filter you want to use"],
    Row[{Manipulate[
       ArrayPlot[
        ImageData@MedianFilter[Image[imageDataOr], ManipulateI], 
        PreserveImageOptions -> False], {{ManipulateI, 1, "t1"}, 0, 
        10, 1}, SynchronousUpdating -> True, 
       LocalizeVariables -> False],
      Manipulate[
       ArrayPlot[
        ImageData@MedianFilter[Image[imageDataOr], ManipulateJ], 
        PreserveImageOptions -> False], {{ManipulateJ, 1, "t2"}, 0, 
        10, 1},
       SynchronousUpdating -> True, LocalizeVariables -> False]}],
    Button["Continue", DialogReturn[1]]}]; 
 originalCorrected = MedianFilter[imageDataOr, ManipulateI]; 
 movedCorrected = MedianFilter[imageDataMo, ManipulateJ];
 ];

Kind regards,

Glenn

I have a set of images which need to be filtered by different filters. So I have made an interface in which the user can choose his or her filter. However I now want to manipulate the degree of the filter. Meanfilter[imagedata, {1,2,3 etc.)]. I now have a working manipulate:

Manipulate[ArrayPlot[MedianFilter[imageDataOr, i]], {i, 0, 10, 1}]

but the image does not refresh when I use it in a graphical user interface. The code is:

outM = DialogInput[{
    TextCell["Adjust filter you want to use"],
    Row[{Manipulate[
       ArrayPlot[MedianFilter[imageDataOr, i]], {i, 0, 10, 1}]}],
    Button["Continue", DialogReturn[1]]}];

image=Import[https://i.sstatic.net/Ekhbd.jpg];
imageDataOr=ImageData[image]

 []

EDIT: You have to grayscale the image.

To be specific. When I use the slider everything works fine, but when I click on a specific point it does not refresh

The solution is now:

butOut = DialogInput[{
   TextCell["Choose the filter you want to use"], 
   Button["Median Filter", DialogReturn[1]]}];
If[butOut == 1, outM = DialogInput[{
    TextCell["Adjust filter you want to use"],
    Row[{Manipulate[
       ArrayPlot[
        ImageData@MedianFilter[Image[imageDataOr], ManipulateI], 
        PreserveImageOptions -> False], {{ManipulateI, 1, "t1"}, 0, 
        10, 1}, SynchronousUpdating -> True, 
       LocalizeVariables -> False],
      Manipulate[
       ArrayPlot[
        ImageData@MedianFilter[Image[imageDataOr], ManipulateJ], 
        PreserveImageOptions -> False], {{ManipulateJ, 1, "t2"}, 0, 
        10, 1},
       SynchronousUpdating -> True, LocalizeVariables -> False]}],
    Button["Continue", DialogReturn[1]]}]; 
 originalCorrected = MedianFilter[imageDataOr, ManipulateI]; 
 movedCorrected = MedianFilter[imageDataMo, ManipulateJ];
 ];

Kind regards,

Glenn

I have a set of images which need to be filtered by different filters. So I have made an interface in which the user can choose his or her filter. However I now want to manipulate the degree of the filter. Meanfilter[imagedata, {1,2,3 etc.)]. I now have a working manipulate:

Manipulate[ArrayPlot[MedianFilter[imageDataOr, i]], {i, 0, 10, 1}]

but the image does not refresh when I use it in a graphical user interface. The code is:

outM = DialogInput[{
    TextCell["Adjust filter you want to use"],
    Row[{Manipulate[
       ArrayPlot[MedianFilter[imageDataOr, i]], {i, 0, 10, 1}]}],
    Button["Continue", DialogReturn[1]]}];

image=Import["https://i.sstatic.net/Ekhbd.jpg"];
imageDataOr=ImageData[image]

 []

EDIT: You have to grayscale the image.

To be specific. When I use the slider everything works fine, but when I click on a specific point it does not refresh

The solution is now:

butOut = DialogInput[{
   TextCell["Choose the filter you want to use"], 
   Button["Median Filter", DialogReturn[1]]}];
If[butOut == 1, outM = DialogInput[{
    TextCell["Adjust filter you want to use"],
    Row[{Manipulate[
       ArrayPlot[
        ImageData@MedianFilter[Image[imageDataOr], ManipulateI], 
        PreserveImageOptions -> False], {{ManipulateI, 1, "t1"}, 0, 
        10, 1}, SynchronousUpdating -> True, 
       LocalizeVariables -> False],
      Manipulate[
       ArrayPlot[
        ImageData@MedianFilter[Image[imageDataOr], ManipulateJ], 
        PreserveImageOptions -> False], {{ManipulateJ, 1, "t2"}, 0, 
        10, 1},
       SynchronousUpdating -> True, LocalizeVariables -> False]}],
    Button["Continue", DialogReturn[1]]}]; 
 originalCorrected = MedianFilter[imageDataOr, ManipulateI]; 
 movedCorrected = MedianFilter[imageDataMo, ManipulateJ];
 ];

Kind regards,

Glenn

added 973 characters in body
Source Link
Glenn
  • 81
  • 2

I have a set of images which need to be filtered by different filters. So I have made an interface in which the user can choose his or her filter. However I now want to manipulate the degree of the filter. Meanfilter[imagedata, {1,2,3 etc.)]. I now have a working manipulate:

Manipulate[ArrayPlot[MedianFilter[imageDataOr, i]], {i, 0, 10, 1}]

but the image does not refresh when I use it in a graphical user interface. The code is:

outM = DialogInput[{
    TextCell["Adjust filter you want to use"],
    Row[{Manipulate[
       ArrayPlot[MedianFilter[imageDataOr, i]], {i, 0, 10, 1}]}],
    Button["Continue", DialogReturn[1]]}];

image=Import[https://i.sstatic.net/Ekhbd.jpg];
imageDataOr=ImageData[image]

 []

EDIT: You have to grayscale the image.

To be specific. When I use the slider everything works fine, but when I click on a specific point it does not refresh Does anyone know what the problem can be?

The solution is now:

butOut = DialogInput[{
   TextCell["Choose the filter you want to use"], 
   Button["Median Filter", DialogReturn[1]]}];
If[butOut == 1, outM = DialogInput[{
    TextCell["Adjust filter you want to use"],
    Row[{Manipulate[
       ArrayPlot[
        ImageData@MedianFilter[Image[imageDataOr], ManipulateI], 
        PreserveImageOptions -> False], {{ManipulateI, 1, "t1"}, 0, 
        10, 1}, SynchronousUpdating -> True, 
       LocalizeVariables -> False],
      Manipulate[
       ArrayPlot[
        ImageData@MedianFilter[Image[imageDataOr], ManipulateJ], 
        PreserveImageOptions -> False], {{ManipulateJ, 1, "t2"}, 0, 
        10, 1},
       SynchronousUpdating -> True, LocalizeVariables -> False]}],
    Button["Continue", DialogReturn[1]]}]; 
 originalCorrected = MedianFilter[imageDataOr, ManipulateI]; 
 movedCorrected = MedianFilter[imageDataMo, ManipulateJ];
 ];

Kind regards,

Glenn

I have a set of images which need to be filtered by different filters. So I have made an interface in which the user can choose his or her filter. However I now want to manipulate the degree of the filter. Meanfilter[imagedata, {1,2,3 etc.)]. I now have a working manipulate:

Manipulate[ArrayPlot[MedianFilter[imageDataOr, i]], {i, 0, 10, 1}]

but the image does not refresh when I use it in a graphical user interface. The code is:

outM = DialogInput[{
    TextCell["Adjust filter you want to use"],
    Row[{Manipulate[
       ArrayPlot[MedianFilter[imageDataOr, i]], {i, 0, 10, 1}]}],
    Button["Continue", DialogReturn[1]]}];

image=Import[https://i.sstatic.net/Ekhbd.jpg];
imageDataOr=ImageData[image]

 []

EDIT: You have to grayscale the image.

To be specific. When I use the slider everything works fine, but when I click on a specific point it does not refresh Does anyone know what the problem can be?

Kind regards,

Glenn

I have a set of images which need to be filtered by different filters. So I have made an interface in which the user can choose his or her filter. However I now want to manipulate the degree of the filter. Meanfilter[imagedata, {1,2,3 etc.)]. I now have a working manipulate:

Manipulate[ArrayPlot[MedianFilter[imageDataOr, i]], {i, 0, 10, 1}]

but the image does not refresh when I use it in a graphical user interface. The code is:

outM = DialogInput[{
    TextCell["Adjust filter you want to use"],
    Row[{Manipulate[
       ArrayPlot[MedianFilter[imageDataOr, i]], {i, 0, 10, 1}]}],
    Button["Continue", DialogReturn[1]]}];

image=Import[https://i.sstatic.net/Ekhbd.jpg];
imageDataOr=ImageData[image]

 []

EDIT: You have to grayscale the image.

To be specific. When I use the slider everything works fine, but when I click on a specific point it does not refresh

The solution is now:

butOut = DialogInput[{
   TextCell["Choose the filter you want to use"], 
   Button["Median Filter", DialogReturn[1]]}];
If[butOut == 1, outM = DialogInput[{
    TextCell["Adjust filter you want to use"],
    Row[{Manipulate[
       ArrayPlot[
        ImageData@MedianFilter[Image[imageDataOr], ManipulateI], 
        PreserveImageOptions -> False], {{ManipulateI, 1, "t1"}, 0, 
        10, 1}, SynchronousUpdating -> True, 
       LocalizeVariables -> False],
      Manipulate[
       ArrayPlot[
        ImageData@MedianFilter[Image[imageDataOr], ManipulateJ], 
        PreserveImageOptions -> False], {{ManipulateJ, 1, "t2"}, 0, 
        10, 1},
       SynchronousUpdating -> True, LocalizeVariables -> False]}],
    Button["Continue", DialogReturn[1]]}]; 
 originalCorrected = MedianFilter[imageDataOr, ManipulateI]; 
 movedCorrected = MedianFilter[imageDataMo, ManipulateJ];
 ];

Kind regards,

Glenn

added 70 characters in body
Source Link
kglr
  • 400.5k
  • 18
  • 488
  • 929

I have a set of images which need to be filtered by different filters. So I have made an interface in which the user can choose his or her filter. However I now want to manipulate the degree of the filter. Meanfilter[imagedata, {1,2,3 etc.)]. I now have a working manipulate:

Manipulate[ArrayPlot[MedianFilter[imageDataOr, i]], {i, 0, 10, 1}]

but the image does not refresh when I use it in a graphical user interface. The code is:

outM = DialogInput[{
    TextCell["Adjust filter you want to use"],
    Row[{Manipulate[
       ArrayPlot[MedianFilter[imageDataOr, i]], {i, 0, 10, 1}]}],
    Button["Continue", DialogReturn[1]]}]; 

image=Import[https://i.sstatic.net/Ekhbd.jpg];
imageDataOr=ImageData[image]

imageDataOr=ImageData []

EDIT: You have to grayscale the image.

To be specific. When I use the slider everything works fine, but when I click on a specific point it does not refresh Does anyone know what the problem can be?

Kind regards,

Glenn

I have a set of images which need to be filtered by different filters. So I have made an interface in which the user can choose his or her filter. However I now want to manipulate the degree of the filter. Meanfilter[imagedata, {1,2,3 etc.)]. I now have a working manipulate:

Manipulate[ArrayPlot[MedianFilter[imageDataOr, i]], {i, 0, 10, 1}]

but the image does not refresh when I use it in a graphical user interface. The code is:

outM = DialogInput[{
    TextCell["Adjust filter you want to use"],
    Row[{Manipulate[
       ArrayPlot[MedianFilter[imageDataOr, i]], {i, 0, 10, 1}]}],
    Button["Continue", DialogReturn[1]]}];

imageDataOr=ImageData []

EDIT: You have to grayscale the image.

To be specific. When I use the slider everything works fine, but when I click on a specific point it does not refresh Does anyone know what the problem can be?

Kind regards,

Glenn

I have a set of images which need to be filtered by different filters. So I have made an interface in which the user can choose his or her filter. However I now want to manipulate the degree of the filter. Meanfilter[imagedata, {1,2,3 etc.)]. I now have a working manipulate:

Manipulate[ArrayPlot[MedianFilter[imageDataOr, i]], {i, 0, 10, 1}]

but the image does not refresh when I use it in a graphical user interface. The code is:

outM = DialogInput[{
    TextCell["Adjust filter you want to use"],
    Row[{Manipulate[
       ArrayPlot[MedianFilter[imageDataOr, i]], {i, 0, 10, 1}]}],
    Button["Continue", DialogReturn[1]]}]; 

image=Import[https://i.sstatic.net/Ekhbd.jpg];
imageDataOr=ImageData[image]

 []

EDIT: You have to grayscale the image.

To be specific. When I use the slider everything works fine, but when I click on a specific point it does not refresh Does anyone know what the problem can be?

Kind regards,

Glenn

added 119 characters in body
Source Link
Glenn
  • 81
  • 2
Loading
added 119 characters in body
Source Link
Glenn
  • 81
  • 2
Loading
added 16 characters in body; edited title
Source Link
Glenn
  • 81
  • 2
Loading
Source Link
Glenn
  • 81
  • 2
Loading