Hello this is in python! Please write this code of merging two images together. Please read the rules. The inputs to your function are: (i) image left: grace\_1.png (size: 350 Rows X 340 Cols), (ii) image right: grace\_2.png (size: 350 Rows X 340 Cols), (iii) image column (c) at which the images should be merged. image_op/operations.py: Edit the function merge Define a new image as follows: the first c columns (default value = 155) should be equal to the first c columns of the left image (grace_1.png). The remaining columns should be equal to the columns greater than c from the right image (grace_2.png). def merge(self, image_left, image_right, column): """ Merge image_left and image_right at column (column) image_left: the input image 1 image_right: the input image 2 column: column at which the images should be merged returns the merged image at column
Hello this is in python! Please write this code of merging two images together. Please read the rules.
The inputs to your function are: (i) image left: grace\_1.png (size: 350 Rows X 340 Cols), (ii) image right: grace\_2.png (size: 350 Rows X 340 Cols), (iii) image column (c) at which the images should be merged.
- image_op/operations.py: Edit the function merge
- Define a new image as follows: the first c columns (default value = 155) should be equal to the first c columns of the left image (grace_1.png). The remaining columns should be equal to the columns greater than c from the right image (grace_2.png).
def merge(self, image_left, image_right, column):
"""
Merge image_left and image_right at column (column)
image_left: the input image 1
image_right: the input image 2
column: column at which the images should be merged
returns the merged image at column
"""
# add your code here
# Please do not change the structure
return image_left # Currently the original image is returned, please replace this with the merged image
Step by step
Solved in 4 steps with 2 images