How can I extract all features for any point in the images using Mathematica? For example, I would like to know what is difference between the features of points A and B in the following image.
Are the two points random coordinates on an arbitrary image or are they geo-locations on Earth?
What do you mean by “all features”? Geographic features (land/ocean, elevation, …), weather features (temperature, wind speed, …), geo-political features (place, region, population, …), or what exactly?
These two points have random coordinates. Consider two random points.
Let’s assume two pixels represent these two points. I need to determine the pixel intensity, RGB, and any other important features related to image characteristics.
image = GeoImage[GeoRange -> Entity["Country", "Morocco"]]
dimensions = ImageDimensions@image
(* Random point in the image *)
SeedRandom[123];
position = RandomInteger[{1, #}] & /@ dimensions
(* RGB values and color for that point *)
rgb = ImageData[image][[Sequence @@ position]]
color = RGBColor@rgb
(* Highlight the point on the image *)
HighlightImage[
image,
ImageMarker[position, Graphics[{Yellow, Disk[{0, 0}, Scaled[.02]]}]]]
Sampling a single pixel value is probably not a good idea. Get the RGB values for a small region around the point and average them.