It is possible to transform between two arbitrary color spaces byįirst transforming from the source space to sRGB and then transformingįrom sRGB to the desired destination space. (Similarly for the inverse transformations.) Rgb2Yuv (num *Y, num *U, num *V, num R, num G, num B ) Rgb2Ycbcr (num *Y, num *Cb, num *Cr, num R, num G, num B ) Rgb2Jpegycbcr (num *Y, num *Cb, num *Cr, num R, num G, num B ) Rgb2Ypbpr (num *Y, num *Pb, num *Pr, num R, num G, num B ) Rgb2Ydbdr (num *Y, num *Db, num *Dr, num R, num G, num B ) Rgb2Yiq (num *Y, num *I, num *Q, num R, num G, num B ) Rgb2Hsv (num *H, num *S, num *V, num R, num G, num B ) Rgb2Hsl (num *H, num *S, num *L, num R, num G, num B ) Rgb2Hsi (num *H, num *S, num *I, num R, num G, num B ) Rgb2Xyz (num *X, num *Y, num *Z, num R, num G, num B ) Xyz2Lab (num *L, num *a, num *b, num X, num Y, num Z ) Xyz2Luv (num *L, num *u, num *v, num X, num Y, num Z ) Xyz2Lch (num *L, num *C, num *h, num X, num Y, num Z ) Xyz2Cat02lms (num *L, num *M, num *S, num X, num Y, num Z ) Rgb2Lab (num *L, num *a, num *b, num R, num G, num B ) Rgb2Luv (num *L, num *u, num *v, num R, num G, num B ) Rgb2Lch (num *L, num *C, num *h, num R, num G, num B ) Rgb2Cat02lms (num *L, num *M, num *S, num R, num G, num B ) Use in C/C++įirst call GetColorTransform, specifying the source andĭestination color spaces as "destdest". Information, see the help documentation for the mexĪs an alternative to MEX, a pure M-code versionĬolorspace.m is also included. Must have a C compiler and MATLAB must be configured to use it. That converts input sRGB values to other representations.įor use in Matlab, colorspace is compiled as a MEX function by This should produce a command line program colorcalc The program isĬompiled with GCC by gcc colorcalc.c colorspace.c -lm -o colorcalc To demonstrate colorspace for use in C programs, a smallĬommand line program colorcalc is included. CompilingĬolorspace can be used either as C/C++ code or compiled SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING PROFITS OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES LOSS OF USE, DATA, OR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,ĮXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS Notice, this list of conditions and the following disclaimer in theĭocumentation and/or other materials provided with the Redistributions in binary form must reproduce the above copyright Notice, this list of conditions and the following disclaimer. ![]() Redistributions of source code must retain the above copyright Modification, are permitted provided that the following conditions are Redistribution and use in source and binary forms, with or without
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |