0

How to take pixels from an input image by using Gaussian sub-sampling (shotgun pattern like)?

I want to take the locations of pixels that are to be taken like in a shotgun pattern concentrated in the middle of the image. Because I do not want to extract features of all pixels in an image. The output should be the coordinates of sampled pixels. I will be thankful if you guide me.

Is there any function or code that I can get help from that.

Your help is appreciated.

S.EB
  • 1,966
  • 4
  • 29
  • 54
  • I think you should specify which programming language you are using, in order to have better answers. – marcoresk Oct 30 '16 at 08:08
  • Your question is quite unclear. What do you mean by *"take pixels"*? Is the issue knowing which ones? Or how to extract them? Take them for what purpose? In what language/OS/environment? And put them where? Why? – Mark Setchell Oct 30 '16 at 08:37
  • @marcoresk thanks for your reply, I am working with Matlab. – S.EB Oct 30 '16 at 11:38
  • @MarkSetchell Thanks for response, "taking pixels" means getting the coordinates of pixels. Yes the problem is how we can extract pixels in a way that in the middle of image, we can get more pixels within a rectangle shape area, and in the next level, when we are getting closer to the image margin, we have lesser number of pixels (i.e., similar to Gaussian weight of sampling) I want to do pixel feature extraction and classification, I want to do feature selection on a small number of pixels since the computation time for all pixels is high-demanding – S.EB Oct 30 '16 at 11:43

1 Answers1

0

If you are looking for a method to define a Region of Interest (ROI) of an image in Matlab in order to perform some operation in a restricted are, remembering that x coordinates represent column and y is on the rows (matlab reads images as matrices):

For cut an image from x1 to x2 and from y1 to y2 try something like

ROI = image[y1:y2,x1:x2]

but how to determine these 4 values without a specific example is up to you

marcoresk
  • 1,837
  • 2
  • 17
  • 29
  • Thanks for your answer, No, I am looking for a method to obtain coordinates of a subset of pixels in an image that the frequency of points in the subset is highest. – S.EB Oct 30 '16 at 15:19