From 12e391254ed3a7cd4574496dc1832618586cf4c8 Mon Sep 17 00:00:00 2001 From: hahnec Date: Mon, 31 Aug 2020 11:02:27 +0200 Subject: [PATCH] feat(mvgd): add analytical solution to MVGD transfer --- color_matcher/__init__.py | 2 +- color_matcher/mvgd_matcher.py | 85 +++++++++++------- docs/build/html/.buildinfo | 2 +- .../html/_static/documentation_options.js | 2 +- docs/build/html/apidoc.html | 41 +++++---- docs/build/html/color_matcher.html | 41 +++++---- docs/build/html/genindex.html | 23 +++-- docs/build/html/index.html | 6 +- docs/build/html/objects.inv | Bin 663 -> 677 bytes docs/build/html/py-modindex.html | 6 +- docs/build/html/readme.html | 6 +- docs/build/html/search.html | 6 +- docs/build/html/searchindex.js | 2 +- 13 files changed, 134 insertions(+), 88 deletions(-) diff --git a/color_matcher/__init__.py b/color_matcher/__init__.py index c897fa7..c710884 100644 --- a/color_matcher/__init__.py +++ b/color_matcher/__init__.py @@ -16,7 +16,7 @@ along with this program. If not, see . """ -__version__ = '0.2.6' +__version__ = '0.3.0' from .top_level import ColorMatcher from .hist_matcher import HistogramMatcher diff --git a/color_matcher/mvgd_matcher.py b/color_matcher/mvgd_matcher.py index 93e9a69..3fe1606 100644 --- a/color_matcher/mvgd_matcher.py +++ b/color_matcher/mvgd_matcher.py @@ -31,7 +31,26 @@ class TransferMVGD(MatcherBaseclass): def __init__(self, *args, **kwargs): super(TransferMVGD, self).__init__(*args, **kwargs) - self._fun = kwargs['fun'] if 'fun' in kwargs else self.mkl_solver + self._fun_dict = {'analytical': self.analytical_solver, 'mkl': self.mkl_solver} + self._fun_name = kwargs['fun'] if 'fun' in kwargs else 'mkl' # use MKL as default + self._fun_call = self._fun_dict[self._fun_name] if self._fun_name in self._fun_dict else self.analytical_solver + + # initialize variables + self.r = np.reshape(self._src, [-1, self._src.shape[2]]) + self.z = np.reshape(self._ref, [-1, self._ref.shape[2]]) + self.cov_r, self.cov_z = np.cov(self.r.T), np.cov(self.z.T) + self.mu_r, self.mu_z = np.mean(self.r, axis=0), np.mean(self.z, axis=0) + + def _init_vars(self): + + self.r = np.reshape(self._src, [-1, self._src.shape[2]]) + self.z = np.reshape(self._ref, [-1, self._ref.shape[2]]) + + self.cov_r = np.cov(self.r.T) + self.cov_z = np.cov(self.z.T) + + self.mu_r = np.mean(self.r, axis=0) + self.mu_z = np.mean(self.z, axis=0) def transfer(self, src: np.ndarray = None, ref: np.ndarray = None, fun: FunctionType = None) -> np.ndarray: """ @@ -41,13 +60,13 @@ def transfer(self, src: np.ndarray = None, ref: np.ndarray = None, fun: Function :param src: Source image that requires transfer :param ref: Palette image which serves as reference :param fun: optional argument to pass a transfer function to solve for covariance matrices - :param t_r: Resulting image after the mapping + :param res: Resulting image after the mapping :type src: :class:`~numpy:numpy.ndarray` :type ref: :class:`~numpy:numpy.ndarray` - :type t_r: :class:`~numpy:numpy.ndarray` + :type res: :class:`~numpy:numpy.ndarray` - :return: **t_r** + :return: **res** :rtype: np.ndarray """ @@ -59,54 +78,54 @@ def transfer(self, src: np.ndarray = None, ref: np.ndarray = None, fun: Function # check if three color channels are provided self.validate_color_chs() - # set solver function for transfer matrix (default is MKL) - self._fun = fun if fun is not None else self._fun + # re-initialize variables to account for change in src and ref when passed to self.transfer() + self._init_vars() - r = np.reshape(src, [-1, src.shape[2]]) - z = np.reshape(ref, [-1, ref.shape[2]]) + # set solver function for transfer matrix + self._fun_call = fun if fun is FunctionType else self._fun_call - cov_r = np.cov(r.T) - cov_z = np.cov(z.T) + # compute transfer matrix + transfer_mat = self._fun_call() - transfer_mat = self._fun(cov_r, cov_z) + # transfer the intensity distributions + res = np.dot((self.r - self.mu_r), transfer_mat) + self.mu_z + res = np.reshape(res, self._src.shape) - mu_r = np.mean(r, axis=0) - mu_z = np.mean(z, axis=0) + return res - t_r = np.dot((r - mu_r), transfer_mat) + mu_z - t_r = np.reshape(t_r, src.shape) - - return t_r - - @staticmethod - def mkl_solver(cov_r: np.ndarray, cov_z: np.ndarray): + def mkl_solver(self): """ - This function computes the transfer matrix based on the Monge-Kantorovich linearization. - :param cov_r: Covariance matrix of source image - :param cov_z: Covariance matrix of reference image - :param transfer_mat: Transfer matrix - - :type cov_r: :class:`~numpy:numpy.ndarray` - :type cov_z: :class:`~numpy:numpy.ndarray` + :return: **transfer_mat**: Transfer matrix :type transfer_mat: :class:`~numpy:numpy.ndarray` - - :return: **transfer_mat** :rtype: np.ndarray """ - [Da2, Ua] = np.linalg.eig(cov_r) + [Da2, Ua] = np.linalg.eig(self.cov_r) Ua = np.array([Ua[:, 2] * -1, Ua[:, 1], Ua[:, 0] * -1]).T Da2[Da2 < 0] = 0 Da = np.diag(np.sqrt(Da2[::-1])) - C = np.dot(Da, np.dot(Ua.T, np.dot(cov_z, np.dot(Ua, Da)))) + C = np.dot(Da, np.dot(Ua.T, np.dot(self.cov_z, np.dot(Ua, Da)))) [Dc2, Uc] = np.linalg.eig(C) Dc2[Dc2 < 0] = 0 Dc = np.diag(np.sqrt(Dc2)) Da_inv = np.diag(1. / (np.diag(Da + np.spacing(1)))) - transfer_mat = np.dot(Ua, np.dot(Da_inv, np.dot(Uc, np.dot(Dc, np.dot(Uc.T, np.dot(Da_inv, Ua.T)))))) + return np.dot(Ua, np.dot(Da_inv, np.dot(Uc, np.dot(Dc, np.dot(Uc.T, np.dot(Da_inv, Ua.T)))))) + + def analytical_solver(self) -> np.ndarray: + """ + An analytical solution to the linear equation system of MVGDs. + + :return: **transfer_mat**: Transfer matrix + :type transfer_mat: :class:`~numpy:numpy.ndarray` + :rtype: np.ndarray + + """ + + cov_r_inv = np.linalg.inv(self.cov_r) + cov_z_inv = np.linalg.inv(self.cov_z) - return transfer_mat + return np.dot(np.dot(np.linalg.pinv(np.dot(self.z-self.mu_z, cov_z_inv)), self.r-self.mu_r), cov_r_inv).T diff --git a/docs/build/html/.buildinfo b/docs/build/html/.buildinfo index b629a5a..8dd1263 100644 --- a/docs/build/html/.buildinfo +++ b/docs/build/html/.buildinfo @@ -1,4 +1,4 @@ # Sphinx build info version 1 # This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. -config: 8ec35f5b9042021743edef2b406e4e61 +config: 56bf47be1cda60fc3fb79ed2a8f61ee6 tags: 645f666f9bcd5a90fca523b33c5a78b7 diff --git a/docs/build/html/_static/documentation_options.js b/docs/build/html/_static/documentation_options.js index 6b7d23e..dd5b32f 100644 --- a/docs/build/html/_static/documentation_options.js +++ b/docs/build/html/_static/documentation_options.js @@ -1,6 +1,6 @@ var DOCUMENTATION_OPTIONS = { URL_ROOT: document.getElementById("documentation_options").getAttribute('data-url_root'), - VERSION: '0.2.6', + VERSION: '0.3.0', LANGUAGE: 'None', COLLAPSE_INDEX: false, BUILDER: 'html', diff --git a/docs/build/html/apidoc.html b/docs/build/html/apidoc.html index 38db2a3..cbdae39 100644 --- a/docs/build/html/apidoc.html +++ b/docs/build/html/apidoc.html @@ -5,7 +5,7 @@ - API documentation — color-matcher 0.2.6 documentation + API documentation — color-matcher 0.3.0 documentation @@ -29,7 +29,7 @@

Navigation

  • previous |
  • - + @@ -121,23 +121,30 @@

    Class hierarchy +
    +analytical_solver()numpy.ndarray
    +

    An analytical solution to the linear equation system of MVGDs.

    +
    +
    Returns
    +

    transfer_mat: Transfer matrix

    +
    +
    Return type
    +

    np.ndarray

    +
    +
    +
    +
    -static mkl_solver(cov_r: numpy.ndarray, cov_z: numpy.ndarray)
    +mkl_solver()

    This function computes the transfer matrix based on the Monge-Kantorovich linearization.

    -
    Parameters
    -
      -
    • cov_r (ndarray) – Covariance matrix of source image

    • -
    • cov_z (ndarray) – Covariance matrix of reference image

    • -
    • transfer_mat (ndarray) – Transfer matrix

    • -
    +
    Returns
    +

    transfer_mat: Transfer matrix

    -
    Returns
    -

    transfer_mat

    -
    -
    Return type
    -

    np.ndarray

    +
    Return type
    +

    np.ndarray

    @@ -152,11 +159,11 @@

    Class hierarchyndarray) – Source image that requires transfer

  • ref (ndarray) – Palette image which serves as reference

  • fun – optional argument to pass a transfer function to solve for covariance matrices

  • -
  • t_r (ndarray) – Resulting image after the mapping

  • +
  • res (ndarray) – Resulting image after the mapping

  • Returns
    -

    t_r

    +

    res

    Return type

    np.ndarray

    @@ -244,7 +251,7 @@

    Navigation

  • previous |
  • - + diff --git a/docs/build/html/color_matcher.html b/docs/build/html/color_matcher.html index 0177de6..af9ea28 100644 --- a/docs/build/html/color_matcher.html +++ b/docs/build/html/color_matcher.html @@ -5,7 +5,7 @@ - color_matcher package — color-matcher 0.2.6 documentation + color_matcher package — color-matcher 0.3.0 documentation @@ -25,7 +25,7 @@

    Navigation

  • modules |
  • - + @@ -140,23 +140,30 @@

    Submodules +
    +analytical_solver()numpy.ndarray
    +

    An analytical solution to the linear equation system of MVGDs.

    +
    +
    Returns
    +

    transfer_mat: Transfer matrix

    +
    +
    Return type
    +

    np.ndarray

    +
    +
    +
    +
    -static mkl_solver(cov_r: numpy.ndarray, cov_z: numpy.ndarray)
    +mkl_solver()

    This function computes the transfer matrix based on the Monge-Kantorovich linearization.

    -
    Parameters
    -
      -
    • cov_r (ndarray) – Covariance matrix of source image

    • -
    • cov_z (ndarray) – Covariance matrix of reference image

    • -
    • transfer_mat (ndarray) – Transfer matrix

    • -
    +
    Returns
    +

    transfer_mat: Transfer matrix

    -
    Returns
    -

    transfer_mat

    -
    -
    Return type
    -

    np.ndarray

    +
    Return type
    +

    np.ndarray

    @@ -171,11 +178,11 @@

    Submodulesndarray) – Source image that requires transfer

  • ref (ndarray) – Palette image which serves as reference

  • fun – optional argument to pass a transfer function to solve for covariance matrices

  • -
  • t_r (ndarray) – Resulting image after the mapping

  • +
  • res (ndarray) – Resulting image after the mapping

  • Returns
    -

    t_r

    +

    res

    Return type

    np.ndarray

    @@ -314,7 +321,7 @@

    Navigation

  • modules |
  • - + diff --git a/docs/build/html/genindex.html b/docs/build/html/genindex.html index 0957f07..0d52fed 100644 --- a/docs/build/html/genindex.html +++ b/docs/build/html/genindex.html @@ -5,7 +5,7 @@ - Index — color-matcher 0.2.6 documentation + Index — color-matcher 0.3.0 documentation @@ -25,7 +25,7 @@

    Navigation

  • modules |
  • - + @@ -40,6 +40,7 @@

    Index

    _ + | A | C | H | L @@ -77,6 +78,18 @@

    _

    +

    A

    + + +
    +

    C

    -
  • mkl_solver() (color_matcher.mvgd_matcher.TransferMVGD static method) +
  • mkl_solver() (color_matcher.mvgd_matcher.TransferMVGD method)
  • @@ -322,7 +335,7 @@

    Navigation

  • modules |
  • - + diff --git a/docs/build/html/index.html b/docs/build/html/index.html index 685e16c..e1d8ed6 100644 --- a/docs/build/html/index.html +++ b/docs/build/html/index.html @@ -5,7 +5,7 @@ - color-matcher reference document — color-matcher 0.2.6 documentation + color-matcher reference document — color-matcher 0.3.0 documentation @@ -29,7 +29,7 @@

    Navigation

  • next |
  • - + @@ -104,7 +104,7 @@

    Navigation

  • next |
  • - + diff --git a/docs/build/html/objects.inv b/docs/build/html/objects.inv index 15d00b05cfd1e05c228ce5d36af5f90077a61075..7d8a99794ede7c787bfaa5aec577572d59b30bb9 100644 GIT binary patch delta 564 zcmV-40?YlE1*HX$e1DfqZ`&{o$M5+R2G(ng^)d{-?E!Q>qzJHKSAmrnTc{p}BxmzJ z{p2VQyRlQt@+mQ?|4+0?Qxere8zRBc5=~Y$4^p#QVD>SiT~A&*DLw?>`Yv0q`rdEt z)8+!90<6vMGpIPzG>C7jazeP`j*vqP=t|Av^b)v=(Ei}o>3_n2jE?%Pa!%w|jM5u| zH-d5$e+7#n^vUn=RypS#t{8g|oPk3U#?jI)LgTU^jLR6FGg%XdI^?h}B|${I+I*_I0C%KqP9k$nN>EHBEa3%_3k~d$(H-{~58Ty?I<8fGIJt#A zF2+KE)Gb1)tID9Yq_$|tA25omVh&U83zl5HUC3y^j}B+T9+1eqy)PufNA`+D>frt{ ziK(=azT5pv$nyn}Klf-+IUb}WfA(d``UlWDUxv_V4O4>^Mhf#DTp&u?_mBfr{ce+Lce_z%*5} zJ~;ws6D?{XOxW?hBilB9Syf+c5SYYnyumUM@X8_>f0F1;5^Q1g&*0y-3-%wAfR4!X C+Zr1H delta 550 zcmV+>0@?kg1(yYoe1DcrZ=)~}hVT3eOWP}Gd#P5v?T6I%kSfwvd$nA90#^NjY{PE) z>(|6dfCf?woDydIJ|1SqgQ*tUU`ZS;z@Tz}FEy(Kps$E_Jz3$T_!4~S4N8-~_h<98 zX(3b)YtbztC1;uj@pV;(F<0DSe24*Dp;??>60Rb&kK8()8-F6BqyDIz6Zr+B@P^=x zpd7_Nh=maP;A)uKKgsu=`#e2CD$b~|C#K|T|%HrD_#1~r`ArO;2>Z#Dd2KTe{zhkU`P?Lw|j zvFMN{PPP@eBY)Fw5}9jU5XHoT6t;*=Xu=K^-Eoicz+I)N<66aslUY*3YAg^y-72K2 zEDczTD+>nyB}Q?T&tb|sXN$YH3mF~L(cw%O-3yr`<9s1?aKukyDs7}6Nbd_u(IT?v z9xbX2gOmj&80Ixr>>GA1p4*pz8`oOEiYs?}w>t9MOn;)&B^FSFnB5&`!sy*TE|3YA z{UyMQ+y4kG+@Fwj?7sO;dp9cdefxy`LnT2u(#*#G=3Ut(zi&b%p>HIIBnLlm8T>nl z1$p%~@$!>3D4&|YNxSU0M`y)>ou1eR{LlbJ;T&z^3pub&xld1yz}bXe2pe|1pUAd* opH|gZ8y_G{LO0%E83;JBK#c#`_cjT(u=;oKZ<~bu2R{o@(J1*0$N&HU diff --git a/docs/build/html/py-modindex.html b/docs/build/html/py-modindex.html index 389ac11..80f5c17 100644 --- a/docs/build/html/py-modindex.html +++ b/docs/build/html/py-modindex.html @@ -5,7 +5,7 @@ - Python Module Index — color-matcher 0.2.6 documentation + Python Module Index — color-matcher 0.3.0 documentation @@ -28,7 +28,7 @@

    Navigation

  • modules |
  • - + @@ -117,7 +117,7 @@

    Navigation

  • modules |
  • - + diff --git a/docs/build/html/readme.html b/docs/build/html/readme.html index 29f4ddb..3bff363 100644 --- a/docs/build/html/readme.html +++ b/docs/build/html/readme.html @@ -5,7 +5,7 @@ - color-matcher — color-matcher 0.2.6 documentation + color-matcher — color-matcher 0.3.0 documentation @@ -33,7 +33,7 @@

    Navigation

  • previous |
  • - + @@ -202,7 +202,7 @@

    Navigation

  • previous |
  • - + diff --git a/docs/build/html/search.html b/docs/build/html/search.html index 6b02e1c..87e2a83 100644 --- a/docs/build/html/search.html +++ b/docs/build/html/search.html @@ -5,7 +5,7 @@ - Search — color-matcher 0.2.6 documentation + Search — color-matcher 0.3.0 documentation @@ -30,7 +30,7 @@

    Navigation

  • modules |
  • - + @@ -81,7 +81,7 @@

    Navigation

  • modules |
  • - + diff --git a/docs/build/html/searchindex.js b/docs/build/html/searchindex.js index 3834b1a..85e4d8f 100644 --- a/docs/build/html/searchindex.js +++ b/docs/build/html/searchindex.js @@ -1 +1 @@ -Search.setIndex({docnames:["apidoc","color_matcher","index","readme"],envversion:{"sphinx.domains.c":2,"sphinx.domains.changeset":1,"sphinx.domains.citation":1,"sphinx.domains.cpp":3,"sphinx.domains.index":1,"sphinx.domains.javascript":2,"sphinx.domains.math":2,"sphinx.domains.python":2,"sphinx.domains.rst":2,"sphinx.domains.std":1,"sphinx.ext.intersphinx":1,"sphinx.ext.todo":2,sphinx:56},filenames:["apidoc.rst","color_matcher.rst","index.rst","readme.rst"],objects:{"":{color_matcher:[1,0,0,"-"]},"color_matcher.ColorMatcher":{__init__:[0,2,1,""],main:[0,2,1,""]},"color_matcher.HistogramMatcher":{__init__:[0,2,1,""],hist_match:[0,2,1,""]},"color_matcher.MatcherBaseclass":{__init__:[0,2,1,""],validate_color_chs:[0,2,1,""],validate_img_dims:[0,2,1,""]},"color_matcher.TransferMVGD":{__init__:[0,2,1,""],mkl_solver:[0,2,1,""],transfer:[0,2,1,""]},"color_matcher.baseclass":{MatcherBaseclass:[1,1,1,""]},"color_matcher.baseclass.MatcherBaseclass":{__init__:[1,2,1,""],validate_color_chs:[1,2,1,""],validate_img_dims:[1,2,1,""]},"color_matcher.hist_matcher":{HistogramMatcher:[1,1,1,""]},"color_matcher.hist_matcher.HistogramMatcher":{__init__:[1,2,1,""],hist_match:[1,2,1,""]},"color_matcher.io_handler":{load_img_file:[1,3,1,""],save_img_file:[1,3,1,""],select_file:[1,3,1,""],suppress_user_warning:[1,3,1,""]},"color_matcher.mvgd_matcher":{TransferMVGD:[1,1,1,""]},"color_matcher.mvgd_matcher.TransferMVGD":{__init__:[1,2,1,""],mkl_solver:[1,2,1,""],transfer:[1,2,1,""]},"color_matcher.normalizer":{Normalizer:[1,1,1,""]},"color_matcher.normalizer.Normalizer":{__init__:[1,2,1,""],norm_fun:[1,2,1,""],type_norm:[1,2,1,""],uint16_norm:[1,2,1,""],uint8_norm:[1,2,1,""]},"color_matcher.top_level":{ColorMatcher:[1,1,1,""]},"color_matcher.top_level.ColorMatcher":{__init__:[1,2,1,""],main:[1,2,1,""]},color_matcher:{ColorMatcher:[0,1,1,""],HistogramMatcher:[0,1,1,""],MatcherBaseclass:[0,1,1,""],TransferMVGD:[0,1,1,""],baseclass:[1,0,0,"-"],hist_matcher:[1,0,0,"-"],io_handler:[1,0,0,"-"],mvgd_matcher:[1,0,0,"-"],normalizer:[1,0,0,"-"],top_level:[1,0,0,"-"]}},objnames:{"0":["py","module","Python module"],"1":["py","class","Python class"],"2":["py","method","Python method"],"3":["py","function","Python function"]},objtypes:{"0":"py:module","1":"py:class","2":"py:method","3":"py:function"},terms:{"class":[1,2],"default":[0,1],"function":[0,1],"return":[0,1],"short":2,"static":[0,1],"switch":1,"throw":[0,1],The:[0,1,3],__init__:[0,1],abov:3,accur:[0,1],across:3,after:[0,1],all:0,altern:3,api:2,approach:3,arg:[0,1],argument:[0,1,3],arrai:1,author:2,automat:3,base:[0,1,3],behind:3,below:[0,2],between:1,bit:1,bool:1,both:[0,1],can:3,categori:1,channel:[0,1],check:[0,1],christoph:3,classic:3,click:2,clone:3,color:[0,1],color_match:0,colormatch:[0,1],com:3,come:3,comput:[0,1],conduct:[0,1],consist:[0,1],content:2,correct:3,cov_r:[0,1],cov_z:[0,1],covari:[0,1],data:[1,3],depend:3,describ:[0,1],descript:2,diagram:0,dialog:1,dimens:[0,1],directori:3,distribut:[0,1],download:3,enabl:3,enter:3,entri:[0,1],equival:3,except:[0,1],extens:0,field:3,file_path:1,file_typ:1,filepath:1,film:3,finish:3,found:3,from:[1,3],full:2,fun:[0,1],futur:0,gaussian:[0,1],get:1,git:3,github:3,grade:3,guid:2,hahn:3,hahnec:3,handi:3,help:[0,1,3],hereaft:0,hierarchi:2,high:[0,1],hist_match:0,histogram:[0,1,3],histogrammatch:[0,1],how:[0,1],http:3,imag:[0,1,3],img:1,inform:3,init_dir:1,initi:[0,1],instal:2,integ:1,interest:0,invari:[0,1],kantorovich:[0,1,3],kwarg:[0,1],level:[0,1],light:3,linear:[0,1],load:3,load_img_fil:1,main:[0,1],manual:3,map:[0,1,3],match:[0,1,3],matcherbaseclass:[0,1],matric:[0,1],matrix:[0,1],max:1,method:[0,1,3],min:1,mkl:[0,1,3],mkl_solver:[0,1],mong:[0,1,3],more:3,multi:[0,1],mvgd:[0,1],ndarrai:[0,1],new_max:1,new_min:1,none:[0,1],norm_fun:1,number:[0,1],numpi:[0,1],object:1,onc:3,option:[0,1,3],org:3,otherwis:[0,1],overview:0,paint:3,palett:[0,1],paramet:[0,1,3],pass:[0,1],perform:[0,1],photograph:3,pip3:3,pip:3,piti:3,png:3,point:[0,1],primari:0,propos:3,provid:[0,1,3],python3:3,python:3,ran:3,readm:2,ref:[0,1,3],refer:[0,1],reinhard:[0,1,3],reinhard_match:1,reinhardmatch:1,repo:3,requir:[0,1,3],resolut:[0,1],result:[0,1,2],root:3,run:3,same:[0,1],save_img_fil:1,schemat:0,scotland_hous:3,scotland_plain:3,see:[0,1],seen:0,select:3,select_fil:1,self:[0,1],sequenc:3,serv:[0,1],setup:3,signatur:[0,1],smoothli:3,solut:3,solv:[0,1],sourc:[0,1,3],specifi:3,src:[0,1,3],stopmot:3,str:[0,1],suppress_user_warn:1,system:3,t_r:[0,1],target:3,test:3,thi:[0,1],thrown:[0,1],titl:1,tkinter:1,tool:3,transfer:[0,1,3],transfer_mat:[0,1],transfermvgd:[0,1],txt:3,type:[0,1,3],type_norm:1,uint16_norm:1,uint8_norm:1,unequ:[0,1],unix:3,unsign:1,user:2,using:3,valid:[0,1],validate_color_ch:[0,1],validate_img_dim:[0,1],valu:1,variat:[0,1],via:3,well:3,where:3,whether:[0,1],which:[0,1,3],win:3,window:3,wise:[0,1],www:3,you:3,your:3},titles:["API documentation","color_matcher package","color-matcher reference document","color-matcher"],titleterms:{"class":0,api:0,author:3,baseclass:1,color:[2,3],color_match:1,command:3,content:1,descript:3,document:[0,2],hierarchi:0,hist_match:1,instal:3,io_handl:1,line:3,matcher:[2,3],modul:1,mvgd_matcher:1,normal:1,packag:1,refer:2,result:3,submodul:1,top_level:1,usag:3}}) \ No newline at end of file +Search.setIndex({docnames:["apidoc","color_matcher","index","readme"],envversion:{"sphinx.domains.c":2,"sphinx.domains.changeset":1,"sphinx.domains.citation":1,"sphinx.domains.cpp":3,"sphinx.domains.index":1,"sphinx.domains.javascript":2,"sphinx.domains.math":2,"sphinx.domains.python":2,"sphinx.domains.rst":2,"sphinx.domains.std":1,"sphinx.ext.intersphinx":1,"sphinx.ext.todo":2,sphinx:56},filenames:["apidoc.rst","color_matcher.rst","index.rst","readme.rst"],objects:{"":{color_matcher:[1,0,0,"-"]},"color_matcher.ColorMatcher":{__init__:[0,2,1,""],main:[0,2,1,""]},"color_matcher.HistogramMatcher":{__init__:[0,2,1,""],hist_match:[0,2,1,""]},"color_matcher.MatcherBaseclass":{__init__:[0,2,1,""],validate_color_chs:[0,2,1,""],validate_img_dims:[0,2,1,""]},"color_matcher.TransferMVGD":{__init__:[0,2,1,""],analytical_solver:[0,2,1,""],mkl_solver:[0,2,1,""],transfer:[0,2,1,""]},"color_matcher.baseclass":{MatcherBaseclass:[1,1,1,""]},"color_matcher.baseclass.MatcherBaseclass":{__init__:[1,2,1,""],validate_color_chs:[1,2,1,""],validate_img_dims:[1,2,1,""]},"color_matcher.hist_matcher":{HistogramMatcher:[1,1,1,""]},"color_matcher.hist_matcher.HistogramMatcher":{__init__:[1,2,1,""],hist_match:[1,2,1,""]},"color_matcher.io_handler":{load_img_file:[1,3,1,""],save_img_file:[1,3,1,""],select_file:[1,3,1,""],suppress_user_warning:[1,3,1,""]},"color_matcher.mvgd_matcher":{TransferMVGD:[1,1,1,""]},"color_matcher.mvgd_matcher.TransferMVGD":{__init__:[1,2,1,""],analytical_solver:[1,2,1,""],mkl_solver:[1,2,1,""],transfer:[1,2,1,""]},"color_matcher.normalizer":{Normalizer:[1,1,1,""]},"color_matcher.normalizer.Normalizer":{__init__:[1,2,1,""],norm_fun:[1,2,1,""],type_norm:[1,2,1,""],uint16_norm:[1,2,1,""],uint8_norm:[1,2,1,""]},"color_matcher.top_level":{ColorMatcher:[1,1,1,""]},"color_matcher.top_level.ColorMatcher":{__init__:[1,2,1,""],main:[1,2,1,""]},color_matcher:{ColorMatcher:[0,1,1,""],HistogramMatcher:[0,1,1,""],MatcherBaseclass:[0,1,1,""],TransferMVGD:[0,1,1,""],baseclass:[1,0,0,"-"],hist_matcher:[1,0,0,"-"],io_handler:[1,0,0,"-"],mvgd_matcher:[1,0,0,"-"],normalizer:[1,0,0,"-"],top_level:[1,0,0,"-"]}},objnames:{"0":["py","module","Python module"],"1":["py","class","Python class"],"2":["py","method","Python method"],"3":["py","function","Python function"]},objtypes:{"0":"py:module","1":"py:class","2":"py:method","3":"py:function"},terms:{"class":[1,2],"default":[0,1],"function":[0,1],"return":[0,1],"short":2,"static":[],"switch":1,"throw":[0,1],The:[0,1,3],__init__:[0,1],abov:3,accur:[0,1],across:3,after:[0,1],all:0,altern:3,analyt:[0,1],analytical_solv:[0,1],api:2,approach:3,arg:[0,1],argument:[0,1,3],arrai:1,author:2,automat:3,base:[0,1,3],behind:3,below:[0,2],between:1,bit:1,bool:1,both:[0,1],can:3,categori:1,channel:[0,1],check:[0,1],christoph:3,classic:3,click:2,clone:3,color:[0,1],color_match:0,colormatch:[0,1],com:3,come:3,comput:[0,1],conduct:[0,1],consist:[0,1],content:2,correct:3,cov_r:[],cov_z:[],covari:[0,1],data:[1,3],depend:3,describ:[0,1],descript:2,diagram:0,dialog:1,dimens:[0,1],directori:3,distribut:[0,1],download:3,enabl:3,enter:3,entri:[0,1],equat:[0,1],equival:3,except:[0,1],extens:0,field:3,file_path:1,file_typ:1,filepath:1,film:3,finish:3,found:3,from:[1,3],full:2,fun:[0,1],futur:0,gaussian:[0,1],get:1,git:3,github:3,grade:3,guid:2,hahn:3,hahnec:3,handi:3,help:[0,1,3],hereaft:0,hierarchi:2,high:[0,1],hist_match:0,histogram:[0,1,3],histogrammatch:[0,1],how:[0,1],http:3,imag:[0,1,3],img:1,inform:3,init_dir:1,initi:[0,1],instal:2,integ:1,interest:0,invari:[0,1],kantorovich:[0,1,3],kwarg:[0,1],level:[0,1],light:3,linear:[0,1],load:3,load_img_fil:1,main:[0,1],manual:3,map:[0,1,3],match:[0,1,3],matcherbaseclass:[0,1],matric:[0,1],matrix:[0,1],max:1,method:[0,1,3],min:1,mkl:[0,1,3],mkl_solver:[0,1],mong:[0,1,3],more:3,multi:[0,1],mvgd:[0,1],ndarrai:[0,1],new_max:1,new_min:1,none:[0,1],norm_fun:1,number:[0,1],numpi:[0,1],object:1,onc:3,option:[0,1,3],org:3,otherwis:[0,1],overview:0,paint:3,palett:[0,1],paramet:[0,1,3],pass:[0,1],perform:[0,1],photograph:3,pip3:3,pip:3,piti:3,png:3,point:[0,1],primari:0,propos:3,provid:[0,1,3],python3:3,python:3,ran:3,readm:2,ref:[0,1,3],refer:[0,1],reinhard:[0,1,3],reinhard_match:1,reinhardmatch:1,repo:3,requir:[0,1,3],res:[0,1],resolut:[0,1],result:[0,1,2],root:3,run:3,same:[0,1],save_img_fil:1,schemat:0,scotland_hous:3,scotland_plain:3,see:[0,1],seen:0,select:3,select_fil:1,self:[0,1],sequenc:3,serv:[0,1],setup:3,signatur:[0,1],smoothli:3,solut:[0,1,3],solv:[0,1],sourc:[0,1,3],specifi:3,src:[0,1,3],stopmot:3,str:[0,1],suppress_user_warn:1,system:[0,1,3],t_r:[],target:3,test:3,thi:[0,1],thrown:[0,1],titl:1,tkinter:1,tool:3,transfer:[0,1,3],transfer_mat:[0,1],transfermvgd:[0,1],txt:3,type:[0,1,3],type_norm:1,uint16_norm:1,uint8_norm:1,unequ:[0,1],unix:3,unsign:1,user:2,using:3,valid:[0,1],validate_color_ch:[0,1],validate_img_dim:[0,1],valu:1,variat:[0,1],via:3,well:3,where:3,whether:[0,1],which:[0,1,3],win:3,window:3,wise:[0,1],www:3,you:3,your:3},titles:["API documentation","color_matcher package","color-matcher reference document","color-matcher"],titleterms:{"class":0,api:0,author:3,baseclass:1,color:[2,3],color_match:1,command:3,content:1,descript:3,document:[0,2],hierarchi:0,hist_match:1,instal:3,io_handl:1,line:3,matcher:[2,3],modul:1,mvgd_matcher:1,normal:1,packag:1,refer:2,result:3,submodul:1,top_level:1,usag:3}}) \ No newline at end of file