Complete the code to load an image for OCR processing.
image = cv2.imread([1])The cv2.imread function loads an image file given its filename as a string.
Complete the code to convert the image to grayscale before OCR.
gray_image = cv2.cvtColor(image, [1])Converting to grayscale uses cv2.COLOR_BGR2GRAY to simplify the image for OCR.
Fix the error in the OCR text extraction line.
text = pytesseract.image_to_string([1])The OCR function should process the grayscale image, not the original color image or modules.
Fill both blanks to create a dictionary with word lengths greater than 3.
word_lengths = {word: [1] for word in text.split() if len(word) [2] 3}This dictionary comprehension stores the length of each word only if the word length is greater than 3.
Fill all three blanks to filter words starting with 'a' and count them.
filtered_words = [word[1] for word in text.split() if word[2]'a')] count = [3](filtered_words)
This code filters words starting with 'a' (case-insensitive) and counts them using len().
