





"""simple docstring"""




import math
import os

import cva
import numpy as np

UpperCamelCase_	 =255.0





def 			a_							(				_lowercase			,		_lowercase  ):
						_UpperCamelCase     :   Dict      =       np.mean((original - contrast) ** 2  )
						if mse == 0:
												return 100

						return 20 * math.logaa(PIXEL_MAX / math.sqrt(_lowercase  )  )





def 			a_							(				):
						_UpperCamelCase     :   Tuple      =       os.path.dirname(os.path.realpath(_lowercase  )  )
						# Loading images (original image and compressed image)
						_UpperCamelCase     :   List[str]      =       cva.imread(os.path.join(_lowercase			,		'''image_data/original_image.png'''  )  )
						_UpperCamelCase     :   str      =       cva.imread(os.path.join(_lowercase			,		'''image_data/compressed_image.png'''  )			,		1  )

						_UpperCamelCase     :   Dict      =       cva.imread(os.path.join(_lowercase			,		'''image_data/PSNR-example-base.png'''  )  )
						_UpperCamelCase     :   List[Any]      =       cva.imread(
						    os.path.join(_lowercase			,		'''image_data/PSNR-example-comp-10.jpg'''  )			,		1  )

						# Value expected: 29.73dB
						print('''-- First Test --'''  )
						print(F"""PSNR value is {peak_signal_to_noise_ratio(_lowercase			,		_lowercase  )} dB"""  )

						# # Value expected: 31.53dB (Wikipedia Example)
						print('''\n-- Second Test --'''  )
						print(F"""PSNR value is {peak_signal_to_noise_ratio(_lowercase			,		_lowercase  )} dB"""  )


if __name__ == "__main__":
						main()






"""simple docstring"""





from __future__ import annotations



def 							_lowerCAmelCase   (    UpperCAmelCase  :				list[int]   ,				UpperCAmelCase  :				int					):


					'''simple docstring'''






					UpperCamelCase__		:     dict[int, int]								={}
					for index, val in enumerate(UpperCAmelCase					):
										UpperCamelCase__		:     List[Any]								=target - val
										if compl in chk_map:
															return [chk_map[compl], index]
										UpperCamelCase__		:     Any								=index
					return []


if __name__ == "__main__":
				import doctest

				doctest.testmod()
				print(F'''{two_sum([2, 7, 1_1, 1_5], 9) = }''')


