Binning of image

Hi
I have one image and I want to apply binnig action in this image.
for eample in binning 2*2:
The shape of the image should be the same.
The count per pixel should be increased by 4.
The matrix of the image should be reduced by 2 in each exis.
Could someone suggest a way I can proceed here?
I load my image with GBLoadWave.
I attach my igor as a picture.
Thanks
image.1.JPG
It is not clear to me if you are interested in pixelating or interpolating your image. Both options exist under the ImageInterpolate operation.

Pixelate example:
make/n=(100,200) ddd=x*y
imageinterpolate/pxsz={2,2} pixelate ddd


Interpolation example:
imageInterpolate/U=0.5 bilinear ddd


Note that although both results have the same dimensions, they represent different calculations.


A.G.
WaveMetrics, Inc.
Thanks for your comment.
My main goal is the matrix of the my image reduce by 2 in each exis because I want use tha Gauss2D fitting.
My Image is 640*480 so it has a lots of points, I like to use binning for reduce this points.
I use your code but after execute it, nothing happens in my graph!
I need your help!!!
saeed wrote:

My main goal is the matrix of the my image reduce by 2 in each exis because I want use tha Gauss2D fitting.
My Image is 640*480 so it has a lots of points, I like to use binning for reduce this points.

It seems that Pixelate is an appropriate option. You might also consider using curve fitting mask wave to reduce the number of points in the fit without using ImageInterpolate.
Quote:
I use your code but after execute it, nothing happens in my graph!

I think you would benefit from two steps:
1. Start using the Data Browser so that you can see the data in the experiment. If you executed the commands that I suggested you would see that they create new waves for you that contain the processed images.
2. Read the documentation for the relevant operation. It is useful to have the Help Browser open and pointed to the relevant operation so you can read what the operation does and where it places the resulting data.

A.G.
WaveMetrics, Inc.