Helloi have an image and want to show its matrix represenation.

  • Thread starter Thread starter qwerty321
  • Start date Start date
  • Tags Tags
    Image Matrix
AI Thread Summary
The discussion revolves around converting a grayscale image into its matrix representation. The user seeks assistance in understanding how to represent the image as a matrix, specifically asking if black squares should be represented as 0 and white squares as 1. Participants clarify that the user needs to determine the matrix dimensions and how to translate pixel colors into numerical values. The conversation emphasizes the importance of providing an attempt at the solution before receiving help and discusses the bit representation for grayscale images. Understanding the number of pixels and bits required is crucial for accurately forming the matrix representation.
qwerty321
Messages
56
Reaction score
0
Hello
i have an image and want to show its matrix represenation..can anyone help me?
 
Physics news on Phys.org


so no one is wiling to help me?:S
wince i have joigned this forum,noone helped me:S
it is my first year and i really am in need of your help:S
 


You mean you want to find the matrix representation of a linear transformation? You have to tell us more info than that if you want help. Without elaboration it's like asking how to find \int f(x) dx without saying what f(x) is.
 
Last edited:


i have an image a pciture in grayscale and black,and i need to show the matrix represenation of the image (matrix should be in decimal)
 


Oh you mean that type of image. In that case, upload your picture on a image-hosting service like imageshack.us and post the image link here.
 


qwerty, you'll first have to show us what your thoughts are on solving this before getting help. It's PF policy, you show an attempt towards solving it first.

You must have some idea what is involved with this problem. It's a 16x16 pixel image.
 


i think i should replace every black square with 0 and every white square with 1 right?
 


qwerty321 said:
i think i should replace every black square with 0 and every white square with 1 right?

The question asks you for the matrix representation. So you need to first figure out the dimensions of your matrix and based on the info given you should know how many rows / columns that matrix should have. And each pixel directly represents an entry in the matrix. You need to figure out what value to put for each entry in the matrix (e.g., "pixel") and the info tells you how to make the translation from pixel color -> numerical value.

So yes, you are correct that you must replace every black square with 0...but that's not it. Read the text under the image.
 
  • #10


ok so i have 16 rows and 16 colums and then..?
 
  • #11


Yes...
 
  • #12


decimal of 0 is 0 right?
and decimal of 1 is 1?
 
  • #13


qwerty321 said:
decimal of 0 is 0 right?
and decimal of 1 is 1?

Yes, the above is correct, but the problem tells you something different.

"The number of bits used to represent gray scale is 2, with all zeros being black, and all ones being white."
 
  • #14


so?what do they mean?
 
  • #15


what is the total number of bits needed? is it 16*16*2 or 16*16*4?
 
Last edited:
  • #16


How many pixels aka matrix entries do you have? How many bits does each take up?
 
Back
Top