how to find pixel value of an image

imread('a.jpg');
[r c]=size(A);pixel

1 Comment

Your question is not clear, mostly because you just wrote 2 lines of code without any question apart from the very vague title.

Sign in to comment.

Answers (4)

aaru sri
aaru sri on 7 Feb 2019
how to make a one pixel change in it
% Gray Image
I = imread('your image') ;
level = I(r, c);
% RGB image
I = imread('your image') ;
rgb = impixel(I,r,c) ;

2 Comments

Undefined function or variable 'c'.
Error in secure>pushbutton2_Callback (line 306) rg = impixel(I,r,c) ;
r,c should be indices which stand off row and column positions.

Sign in to comment.

I just update your answer, if you need to know the rows and columns in your image:
Let's say you have an image which is
I = imread('abc.png') % your image
rgb = impixel(I,rows, columns) %impixel function
rgb = 107 107 107 % you will get the pixel value
Hi! May I ask how to determine the pixel value of a grayscale picture?

Categories

Find more on Images in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!