Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started