Question: Image Compression: Write a code to compress a binary image using Run length Encoding encode_image: Write your code to compute run length code for the

Image Compression:

Write a code to compress a binary image using Run length Encoding

  • encode_image: Write your code to compute run length code for the binary image. The input to your function will be a binary image(0's and 255's) and output ia a run length code.
    • decode_image: Write your code to get binary image from run length code returned by encode_image funtion. The input of the function is run length code, height and width of the binary image The output of the function is bnary image recosntructed from run length code.
  • Do not use any in-built functions from opencv and numpy. In general, you can use function from math library. Functions allowed for this part are: np.array(), np.matrix(), np.zeros(), np.ones(), cv2.imread(), cv2.namedWindow(), cv2.waitKey().

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!