
    
3jj
                     x    S r SrSrSSKJr  SSK7  SSKJr  SSKJ	r	  SS	K
r
SS	Kr " S
 S\
R                  5      rg	)zChristopher Hahnezinbox@christopherhahne.dea  
    Copyright (c) 2020 Christopher Hahne <inbox@christopherhahne.de>

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.

    )ColorMatcher)*   )download_stack)MatchMethodTesterNc                   4   ^  \ rS rSrU 4S jrS rS rSrU =r$ )MatchKodakTester    c                 .   > [         [        U ]
  " U0 UD6  g )N)superr	   __init__)selfargskwargs	__class__s      O/home/wildlama/miniconda3/lib/python3.13/site-packages/tests/kodak_data_test.pyr   MatchKodakTester.__init__"   s    .??    c                     [         R                  R                  [         R                  R                  [        5      5      U l        [         R                  R                  U R
                  S5      U l        g )Ndata)ospathdirnamerealpath__file__dir_pathjoindat_path)r   s    r   setUpMatchKodakTester.setUp%   s?    (8(8(BCT]]F;r   c           	         Sn[        S5       Vs/ s H&  nS[        US-   5      R                  S5      -   S-   PM(     snU l        [        R
                  R                  U R                  S5      n [        R                  " US5        [        R                  " [        R
                  R                  US	5      S5        [        R
                  R                  U5      (       d  [        X5        U R                   H  nU R                   H  n[        [        R
                  R                  X45      5      n[        [        R
                  R                  X55      5      n[        XgS
S9R                  5       n[        R                   " X5      n	[#        SU	-  5        [        R
                  R                  US	UR%                  S5      S   S-   U-   5      n
['        XS9  U R)                  SU	S:g  5        M     M     g s  snf ! [         a     GNKf = f)Nz8https://www.math.purdue.edu/~lucier/PHOTO_CD/BMP_IMAGES/   IMGr      z.bmpkodaki  resultsz	hm-mkl-hm)methodzAvg. histogram distance %s.r   _from_)	file_pathT)rangestrzfillfnamesr   r   r   r   makedirsOSErrorexistsr   load_img_filer   mainr   avg_hist_distprintsplitsave_img_fileassertEqual)r   urliloc_pathfn_img1fn_img2img1img2resvaloutput_filenames              r   test_kodak_images"MatchKodakTester.test_kodak_images*   s   HEJ2YOYus1q5z//22V;YO77<<w7	KK%(KKXy95A ww~~h''3){{G;;$RWW\\(%DE$RWW\\(%DE #4kBGGI (55c@2S89 #%'',,xGMMRUDVWXDY\dDdgnDn"oc=   sax0# ' # P  		s   -G50AG: :
HH)r   r   r.   )	__name__
__module____qualname____firstlineno__r   r   rC   __static_attributes____classcell__)r   s   @r   r	   r	       s    @<
!1 !1r   r	   )
__author__	__email____license__color_matcher.top_levelr   color_matcher.io_handlerimg_downloaderr   tests.unit_testr   unittestr   TestCaser	    r   r   <module>rU      s>    !
'	$ 1 & * -  	+1x(( +1r   