Questions tagged [pixel-manipulation]
54 questions
0
votes
1 answer
Copying SDL_Surface pixels into an STL container
I wrote this function that I want to use in a program, but for some reason, it fails despite nothing going wrong:
std::deque > load_image(std::string & image_name){
SDL_Surface * image = open_image(image_name);
if…

calccrypto
- 8,583
- 21
- 68
- 99
0
votes
1 answer
Pixel manipulation on iphone
I am working on an application, which has to use pixel manipulation in the following way: around a point(x,y) I have to condense or expand the pixels in a circle of radius R, but I want to keep the rectangular frame of the UIImage. I get the raw…

overbet13
- 1,654
- 1
- 20
- 36
0
votes
1 answer
Pixel manipulation in Numpy
I want to convert all pixel values 0 instead of the value of 255. Pixel values are kept in Numpy array, namely x and:
x.shape = (100, 1, 256, 256)
How to manipulate arrays with the condition?
I tried the below but the error occured "ValueError: The…

helloworld
- 89
- 1
- 9
0
votes
0 answers
How can I achieve simple pixel manipulations in canvas like enhance shadow/highlight or make an image warmer/cooler?
I'm building an image editor using canvas, similar to what you might see in instagram or iphone's default photo editor. So far I've been able to implement the ability to do the following - sharpen, blur, contrast, brighten, tint, saturate, adjust…

Noah Wilson
- 33
- 1
- 6
0
votes
1 answer
How do I prevent error when user enters something else not prompted?
I'm making a filter/pixel manipulation program. Basically I've finished it all, only bug is that when the user enters something else that is not prompted like 'x' instead of 'a', etc. I've tried a "try:" and "except ValueError:" statement but im…

pbedol
- 13
- 1
- 2
0
votes
0 answers
Lowest possible level to create a window and manipulate it's pixels on Linux (Raspbian) in C
I want to create a blank window in Raspbian / Raspberry Pi OS and manipulate it's pixels. Nothing more, I don't need mouse interactions, inputs, text or anything else, just a way to calculate whether a pixel at a given position is black or white.…

Merlin0216
- 39
- 1
- 5
0
votes
1 answer
how to copy pixel values of an image to another python variable to make that python variable hold the image in opencv
I have created a black image using np.zeros:
mask = np.zeros((800, 500, 3))
Now I want to edit this variable named mask turn it into an image I like. I know I can access pixel value like this:
for i in range(0,800):
for j in range(0,500):
…

Shaharin Ahmed
- 110
- 7
0
votes
1 answer
dimming the alpha value of a pixel android
i'm trying to dim the alpha channel of individual pixels in a bitmap. i'd like to keep the pixels color rgb but just make the pixel semi transparent. i've looked at the Color class and tried the Color.argb(int,int,int,int) method, but no good. how…

turtleboy
- 8,210
- 27
- 100
- 199
0
votes
1 answer
Smooth jagged pixels
I've created a pinch filter/effect on canvas using the following algorithm:
// iterate pixels
for (var i = 0; i < originalPixels.data.length; i+= 4) {
// calculate a pixel's position, distance, and angle
var pixel = new…

akinuri
- 10,690
- 10
- 65
- 102
0
votes
1 answer
Faster image pixel manipulation in python
I have the following nested loop which goes over a big image (7020x5100) and sets pixel values of another image with the same dimension depending of the value of i. The problem that this is very very slow...could you please give a hint, how to speed…

Kristan
- 387
- 6
- 19
0
votes
2 answers
HTML Canvas Sniff Webgl Data
This question might be weird but suppose we have a canvas which for example draws some 3D content like this experiment.
Disregarding using ThreeJS, Babylon or any other library to achieve same effect, is it possible to set some interval that copies…

ProllyGeek
- 15,517
- 9
- 53
- 72
0
votes
1 answer
Qt - displaying unsigned char after pixel manipulation
I'm trying to display my manipulated pixels (gray scale them) which is represented as unsigned char unsuccefully.
Here is the code:
#include "mainwindow.h"
#include
#include "qimage.h"
#include
#include
#include…

Daniel Eitan
- 45
- 1
- 7
0
votes
0 answers
How do I fix this image (pixel by pixel) distortion issue?
I am attempting to distort an image displayed within a canvas, so it looks like a "planet". However I am struggling to find away to deal with a distortion issue. The only solution coming to mind is to find a way to reduce the radiusDistance…

Matthew Spence
- 986
- 2
- 9
- 27
0
votes
1 answer
How to Sharpen Images for iPhone Usage
I have some images that i want to use on my iphone application. The problem is i think that the resolution is not right cause its not sharp at all when see it on the device. This is how it looks when i zoom in a bit on it:
The idea is to use this…

Timo Cengiz
- 3,367
- 4
- 23
- 45
0
votes
1 answer
refining captcha with a little noise
I'm trying to crack a particular web CAPTCHA. I'm planning to do it by segmenting the characters and passing them to an ANN (mostly for features, I will be using method of moments as it seems difficult to completely remove noise completely)
The…

Quark
- 218
- 2
- 14