Last active
September 12, 2023 05:23
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def merge_two_half_bits(self, pos: str): | |
'''Merge two half bits images.''' | |
self.merged_image = self.original_cover_image.copy() | |
pos_slice = self.get_slicing( | |
self.merged_image.shape, | |
self.left_half_bits_hidden_image.shape, | |
pos | |
) | |
# assign the left half bits hidden image into subarray of cover image | |
# separate the color channels | |
for channel in range(3): | |
self.merged_image[pos_slice][..., channel] = self.__mb_lookup[ | |
self.merged_image[pos_slice][..., channel], | |
self.left_half_bits_hidden_image[..., channel] | |
] | |
self.merged_image = self.merged_image.astype('uint8') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment