Question

How to convert a 128x128 or 256x256 grayscale image into a binary bitsream in mat lab?

How to convert a 128x128 or 256x256 grayscale image into a binary bitsream in mat lab?

Homework Answers

Answer #1

BW = im2bw(I, level) converts the grayscale image I to a binary image. The output image BW replaces all pixels in the input image with luminance greater than level with the value 1 (white) and replaces all other pixels with the value 0 (black). Specify level in the range [0,1]. This range is relative to the signal levels possible for the image's class. Therefore, a level value of 0.5 is midway between black and white, regardless of class. To compute the level argument, you can use the function graythresh. If you do not specify level, im2bw uses the value 0.5.

BW = im2bw(X, map, level) converts the indexed image X with colormap map to a binary image.

BW = im2bw(RGB, level) converts the truecolor image RGB to a binary image.

If the input image is not a grayscale image, im2bw converts the input image to grayscale, and then converts this grayscale image to binary by thresholding.

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
Create a python program that takes in an image from the user and puts the image...
Create a python program that takes in an image from the user and puts the image into matrices of red, green, and blue. Then use the equation Y = 0.2126R + 0.7125G + 0.0722B to convert the image to grayscale and output the grayscale image. You must only use the libraries numpy, matplotlib.pyplot, and math. You may not use pillow, openCV, sciPy, etc.
Convert 0xD1 (hexadecimal) to binary and to decimal Convert 0b11001001 (binary) to hex and to decimal
Convert 0xD1 (hexadecimal) to binary and to decimal Convert 0b11001001 (binary) to hex and to decimal
Convert to binary a) Convert 28910 to binary using subtraction or division remainder. Show your work....
Convert to binary a) Convert 28910 to binary using subtraction or division remainder. Show your work. b) Convert BF16 to binary. Show your work
1. Convert 101 from binary to decimal. Show your work. 2. Convert 11111111 from binary to...
1. Convert 101 from binary to decimal. Show your work. 2. Convert 11111111 from binary to hexadecimal. Show your work. 3. Convert 11001 from binary to decimal. Show your work. 4. Convert A4B from hexadecimal to binary. Show your work. 5. Convert 1100100 from binary to decimal. Show your work. 6. Convert 15 from decimal to binary. Show your work. 7. Convert 255 from decimal to binary. Show your work. 8. Convert BAC4 from hexadecimal to decimal. Show your work....
Write a matlab code for following : Load image ‘Balloon.tif’ into Matlab .  Develop a...
Write a matlab code for following : Load image ‘Balloon.tif’ into Matlab .  Develop a function to mark all pixels in green with 1 and 0 for the rest. Display the result image  Convert it into a grayscale image, denoted with ‘img1’  Create a copy of the clean grayscale image, denoted with ‘img2’, in the memory and add salt and pepper noise to it using imnoise  Remove salt and pepper noise using function medfilt2 and display...
Convert D3B.C16 to binary
Convert D3B.C16 to binary
A)How do you convert 1/3 into binary with detailed steps ? B) Also how do you...
A)How do you convert 1/3 into binary with detailed steps ? B) Also how do you convert from repeating binary into decimal. (0.0110011001100110....0110) in base 2 . Assume 0110 patters go to forever. how can we convert it into decimal.
7. Convert 0.25 to binary with 8 bits to the right of the binary point. 8....
7. Convert 0.25 to binary with 8 bits to the right of the binary point. 8. Convert -47 (base 10) to binary 8-bit signed-magnitude. 9. Convert -39 (base 10) to 8-bit binary using excess 127 notation. 10. Convert -61 (base 10) to 8-bit binary using two’s complement
Convert the hexadecimal number DEADBEEF to binary. Convert the following decimal number to binary: a) 356...
Convert the hexadecimal number DEADBEEF to binary. Convert the following decimal number to binary: a) 356              b) 658 What decimal value does the 8-bit binary number 10011110 represent if it is on a computer using two’s complement representation? What decimal value does the 8-bit binary number 10110100 have if it is on a computer using two’s complement representation? please show your work for question number 4. thank you.
how can i convert an octal value 362.54 to decimal, binary, and hexadecimal?
how can i convert an octal value 362.54 to decimal, binary, and hexadecimal?
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT