Questions tagged [pixel]

A pixel is the smallest unit that can be represented or controlled on a display. The word pixel is derived from the phrase "picture element".

4067 questions
37
votes
7 answers

Cycle through pixels with opencv

How would I be able to cycle through an image using opencv as if it were a 2d array to get the rgb values of each pixel? Also, would a mat be preferable over an iplimage for this operation?
a sandwhich
  • 4,352
  • 12
  • 41
  • 62
37
votes
5 answers

How to get the color of a pixel in an UIView?

I am trying to develop a small application. In it, I need to detect the color of a pixel within an UIView. I have a CGPoint defining the pixel I need. The colors of the UIView are changed using CoreAnimation. I know there are some complex ways to…
0x90
  • 6,079
  • 2
  • 36
  • 55
35
votes
4 answers

How can I measure pixels in Chrome without an extension?

Due to security limitations at work, I am not allowed to install Chrome extensions. Chrome has a ruler built in to the developer tools, but I can't figure out how to define start and end points like a ruler would permit. Are there any tools or…
adamdport
  • 11,687
  • 14
  • 69
  • 91
33
votes
1 answer

How does invisible pixel conversion tracking work?

I'm trying to track clicks from our site to an external website. On the external website, I'd like to place some code on their checkout thank-you page, that tells our server that a particular click has resulted in a sale. How does this tracking code…
cjm2671
  • 18,348
  • 31
  • 102
  • 161
32
votes
2 answers

tool to get coordinates of an image pixel

I need a tool using which,when i point the mouse at a particular location of an image,it should give me location of the pixel relative to the image.for ex.i have a 720x480 image,my pointer is somewhere on the image,then the tool should tell me it is…
androidnewbie
  • 423
  • 2
  • 8
  • 15
31
votes
4 answers

Size of zero pixels in CSS with or without 'px' suffix?

Googling for the answer to this question has proven difficult so I figured somebody here should know. Within CSS, I've seen zero pixels declared as simply '0' yet also as '0px'. mystyle { width: 0; } anotherstyle { width: 0px; } The minor problem…
Sparky
  • 98,165
  • 25
  • 199
  • 285
30
votes
6 answers

How do dp, dip, dpi, ppi, pixels and inches relate?

I was reading dp, dip, px, sp measurements, but I still have some questions about dp/dpi vs ppi vs px vs inch. I am not able to compare them... is an inch the largest? They say 160 dpi means 160 pixels per one inch. Does that mean 1 inch contains…
Rebooting
  • 2,762
  • 11
  • 47
  • 70
29
votes
1 answer

Make a 2D pixel plot with matplotlib

I got the following data from some calculations: x, y, temp where x and y are the coordinates of a point in a 2D box of dimensions 10x10. Spacing is equal to 0.1. So there are 10000 different points and the resulting file looks like: 0.0 0.0…
Open the way
  • 26,225
  • 51
  • 142
  • 196
28
votes
3 answers

Is a CSS pixel really an absolute unit? That is, is 1 inch = 96px true?

The official W3C documentation says: 1 px = 1/96th of 1 in In my previous 18.5 inch screen, the screen.width was 1367 px and the screen width in inches was 14 inches. By the W3C formula: 14 * 96 px = 1344 px The W3C formula deviated by 20/14…
user31782
  • 7,087
  • 14
  • 68
  • 143
28
votes
11 answers

How do I access the pixels of an image using OpenCV-Python?

I want to know how to loop through all pixels of an image. I tried this: import cv2 import numpy as np x = np.random.randint(0,5,(500,500)) img = cv2.imread('D:\Project\Capture1.jpg',0) p = img.shape print p rows,cols = img.shape for i in…
Harini Subhakar
  • 281
  • 1
  • 3
  • 3
28
votes
9 answers

Pixel to Centimeter?

I just want to know if the pixel unit is something that doesn't change, and if we can convert from pixels to let's say centimeters ?
Nassif Bourguig
  • 755
  • 1
  • 10
  • 10
27
votes
6 answers

Get color of each pixel of an image using BufferedImages

I am trying to get every single color of every single pixel of an image. My idea was following: int[] pixels; BufferedImage image; image = ImageIO.read(this.getClass.getResources("image.png"); int[] pixels =…
user2410644
  • 3,861
  • 6
  • 39
  • 59
26
votes
6 answers

How to get the pixel color on touch?

I know this is a common question and there are a lot of answers of this question. I've used some of this. Although many of them are the same. But the sad thing for me is that none of them worked for me. The following codes i've used till…
Erfan
  • 1,284
  • 1
  • 13
  • 21
26
votes
2 answers

Pixel density, retina display and font-size in CSS

I don't have a Retina MacBook myself to test these things out, and there seems to be a lot of confusion on the internet about web design on high pixel density displays. Now, I assume that WebKit on a MacBook with Retina display scales the page about…
user1614463
24
votes
6 answers

Can I make a rather native C++ app with Android?

I'm interested in the following features: Writing an app for Android Market that is written completely in C++ (a port of existing product actually). Use fast screen-buffer pixel pushing (or rather using OpenGL ES for this). Grab user input and…
Hedin
  • 630
  • 3
  • 8
  • 19