convert a grayscale image into bit pattern

11 ビュー (過去 30 日間)
Shone rudeetha
Shone rudeetha 2019 年 11 月 26 日
編集済み: Shone rudeetha 2019 年 11 月 27 日
dear guys..i m beginner..i need to convert a grayscale image into bit pattern.. like 1100101000100100010000010101010101000101010101010101010000101010000011111111000.....whole the image.
my goal is, I built an arduino code to transmit any bit pattern from a one pc to other pc.one side is connect a LED with one arduino board and other side connect a photodiode with other arduino.I success with that progress because i transmit any bit pattern to the other side through the visible light using a led and a photodiode.
Then i need to encode an image into bit pattern and combine with the arduino code to transmit an image to the otherside..

回答 (2 件)

KALYAN ACHARJYA
KALYAN ACHARJYA 2019 年 11 月 26 日
編集済み: KALYAN ACHARJYA 2019 年 11 月 26 日
Steps:
  1. Convert image RGB to gray (rgb2gray)
  2. Read individual decimal pixel values and convert to binary (Same as gray binary slices) Read LSB or MSB
Here individual pixels as 8 bit bit pattern, call bits from MSB or LSB as per the requirements.
  1 件のコメント
Shone rudeetha
Shone rudeetha 2019 年 11 月 27 日
編集済み: Shone rudeetha 2019 年 11 月 27 日
@ KALYAN ACHARJYA how can i do it?

サインインしてコメントする。


Shone rudeetha
Shone rudeetha 2019 年 11 月 26 日
please give me an example code to transmit an image in to that bit pattern as a output.please help me to find an answer to this question.

Community Treasure Hunt

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

Start Hunting!

Translated by