# how to determine coordinate of grid elements of an image

• Last Update :
• Techknowledgy :

Seems like this is what you want:

```x = [i
for i in range(696, 14782, 696) for j in range(696, 5495, 696)
]
y = [j
for i in range(696, 14782, 696) for j in range(696, 5495, 696)
]```

to test it

```import matplotlib.pyplot as plt
plt.imshow(img, cmap = 'gray')
plt.plot(x, y, 'ro')```

Suggestion : 2

Generic Geometric Transformations,Geometric Transformation and Image Registration,Image Coordinate Systems,Define World Coordinate System of Image

`I(2, 15)`
`RGB(2, 15,: )`

Suggestion : 3

4 Creating a Simple Image Map4.1 Step 1: Determine the size of our image4.2 Step 2: Create a map to overlay the image4.3 Step 3: Define the coordinates for the map shapes4.4 Step 4: Put it all together,4.3 Step 3: Define the coordinates for the map shapes, Notice that since the shape over the Scrabble images has five corners there are five sets of dimensions in the code., The ismap image attribute is used to identify an image as part of a server-side image map, and the img tag is wrapped in an anchor element which points toward the map file. Here’s what the HTML portion of the code for a server-side image map looks like:

Our image is 1000 pixels wide by 664 pixels tall. However, in this example, we’re going to use HTML to cause the image to display half that size: 500 by 332 pixels. When you create an image map it’s important to remember that if you change the size of the image you will also have to change the area coordinates. This is because the area coordinates are tied to the original size and scale of the image. In order to render our image in the size we’ve selected we’ll use this code:

`<img src="../../wp-content/uploads/image_map_example_shapes.png" alt="image map example" width=500 height=332 usemap="#map_example">`

The map code is quite simple. It looks like this:

`<map name="map_example"> </map>`

We can create that shape, or `area`, in an HTML `map` by using the following code:

`<area href="https://facebook.com" alt="Facebook" target="_blank" shape=poly coords="30,100, 140,50, 290,220, 180,280">`

We can combine the image, map, and shapes into a single block of code that looks like this:

`<div id="image_map"> <map name="map_example"> <area href="https://facebook.com" alt="Facebook" target="_blank" shape=poly coords="30,100, 140,50, 290,220, 180,280"> <area href="https://en.wikipedia.org/wiki/Social_media" target="_blank" alt="Wikipedia Social Media Article" shape=poly coords="190,75, 200,60, 495,60, 495,165, 275,165"> </map> <img src="../../wp-content/uploads/image_map_example_shapes.png" alt="image map example" width=500 height=332 usemap="#map_example"> </div>`

The `ismap` image attribute is used to identify an image as part of a server-side image map, and the `img` tag is wrapped in an anchor element which points toward the map file. Here’s what the HTML portion of the code for a server-side image map looks like:

`<a href="../file-path/ismap.map"> <img ismap src="../file-path/image-map.jpg" alt="Image Map"> </a>`

Suggestion : 4

Note in particular that the pixel that is identified by a pair of coordinates (x,y) depends on the choice of coordinate system. You always need to know what coordinate system is in use before you know what point you are talking about.,To create a two-dimensional image, each point in the image is assigned a color. A point in 2D can be identified by a pair of numerical coordinates. Colors can also be specified numerically. However, the assignment of numbers to points or colors is somewhat arbitrary. So we need to spend some time studying coordinate systems, which associate numbers to points, and color models, which associate numbers to colors.,Row and column numbers identify a pixel, not a point. A pixel contains many points; mathematically, it contains an infinite number of points. The goal of computer graphics is not really to color pixels—it is to create and manipulate images. In some ideal sense, an image should be defined by specifying a color for each point, not just for each pixel. Pixels are an approximation. If we imagine that there is a true, ideal image that we want to display, then any image that we display by coloring pixels is an approximation. This has many implications.,The fact that pixels come in such a range of sizes is a problem if we use coordinate systems based on pixels. An image created assuming that there are 100 pixels per inch will look tiny on a 400 PPI display. A one-pixel-wide line looks good at 100 PPI, but at 400 PPI, a one-pixel-wide line is probably too thin.

To allow programmers to specify the coordinate system that they would like to use, it would be good to have a subroutine such as

`setCoordinateSystem(left, right, bottom, top)`

Formulas for newX and newY are then given by

```newX = newLeft +
((oldX - oldLeft) / (oldRight - oldLeft)) * (newRight - newLeft))
newY = newTop +
((oldY - oldTop) / (oldBottom - oldTop)) * (newBotom - newTop)```

The logic here is that oldX is located at a certain fraction of the distance from oldLeft to oldRight. That fraction is given by

`((oldX - oldLeft) / (oldRight - oldLeft))`

A coordinate system also has an aspect ratio. If the horizontal and vertical limits for the coordinate system are left, right, bottom, and top, as above, then the aspect ratio is the absolute value of

`(right - left) / (top - bottom)`

Often, a fourth component is added to color models. The fourth component is called alpha, and color models that use it are referred to by names such as RGBA and HSLA. Alpha is not a color as such. It is usually used to represent transparency. A color with maximal alpha value is fully opaque; that is, it is not at all transparent. A color with alpha equal to zero is completely transparent and therefore invisible. Intermediate values give translucent, or partly transparent, colors. Transparency determines what happens when you draw with one color (the foreground color) on top of another color (the background color). If the foreground color is fully opaque, it simply replaces the background color. If the foreground color is partly transparent, then it is blended with the background color. Assuming that the alpha component ranges from 0 to 1, the color that you get can be computed as

`new_color = (alpha) * (foreground_color) + (1 - alpha) * (background_color)`