MagickCore 7.1.0
Convert, Edit, Or Compose Bitmap Images
|
#include "MagickCore/studio.h"
#include "MagickCore/blob.h"
#include "MagickCore/blob-private.h"
#include "MagickCore/cache.h"
#include "MagickCore/exception.h"
#include "MagickCore/exception-private.h"
#include "MagickCore/image-private.h"
#include "MagickCore/matrix.h"
#include "MagickCore/matrix-private.h"
#include "MagickCore/memory_.h"
#include "MagickCore/pixel-accessor.h"
#include "MagickCore/resource_.h"
#include "MagickCore/semaphore.h"
#include "MagickCore/thread-private.h"
#include "MagickCore/utility.h"
Go to the source code of this file.
Data Structures | |
struct | _MatrixInfo |
Macros | |
#define | GaussJordanSwap(x, y) |
Functions | |
static MagickOffsetType | WriteMatrixElements (const MatrixInfo *magick_restrict matrix_info, const MagickOffsetType offset, const MagickSizeType length, const unsigned char *magick_restrict buffer) |
static MagickBooleanType | SetMatrixExtent (MatrixInfo *magick_restrict matrix_info, MagickSizeType length) |
MagickExport MatrixInfo * | AcquireMatrixInfo (const size_t columns, const size_t rows, const size_t stride, ExceptionInfo *exception) |
MagickExport double ** | AcquireMagickMatrix (const size_t number_rows, const size_t size) |
MagickExport MatrixInfo * | DestroyMatrixInfo (MatrixInfo *matrix_info) |
MagickPrivate MagickBooleanType | GaussJordanElimination (double **matrix, double **vectors, const size_t rank, const size_t number_vectors) |
MagickExport size_t | GetMatrixColumns (const MatrixInfo *matrix_info) |
static ssize_t | EdgeX (const ssize_t x, const size_t columns) |
static ssize_t | EdgeY (const ssize_t y, const size_t rows) |
static MagickOffsetType | ReadMatrixElements (const MatrixInfo *magick_restrict matrix_info, const MagickOffsetType offset, const MagickSizeType length, unsigned char *magick_restrict buffer) |
MagickExport MagickBooleanType | GetMatrixElement (const MatrixInfo *matrix_info, const ssize_t x, const ssize_t y, void *value) |
MagickExport size_t | GetMatrixRows (const MatrixInfo *matrix_info) |
MagickPrivate void | LeastSquaresAddTerms (double **matrix, double **vectors, const double *terms, const double *results, const size_t rank, const size_t number_vectors) |
MagickExport Image * | MatrixToImage (const MatrixInfo *matrix_info, ExceptionInfo *exception) |
MagickExport MagickBooleanType | NullMatrix (MatrixInfo *matrix_info) |
MagickExport double ** | RelinquishMagickMatrix (double **matrix, const size_t number_rows) |
MagickExport MagickBooleanType | SetMatrixElement (const MatrixInfo *matrix_info, const ssize_t x, const ssize_t y, const void *value) |
#define GaussJordanSwap | ( | x, | |
y | |||
) |
MagickExport double ** AcquireMagickMatrix | ( | const size_t | number_rows, |
const size_t | size | ||
) |
Definition at line 317 of file matrix.c.
References AcquireQuantumMemory(), and RelinquishMagickMemory().
Referenced by GenerateCoefficients().
MagickExport MatrixInfo * AcquireMatrixInfo | ( | const size_t | columns, |
const size_t | rows, | ||
const size_t | stride, | ||
ExceptionInfo * | exception | ||
) |
Definition at line 200 of file matrix.c.
References AcquireMagickMemory(), AcquireMagickResource(), AcquireSemaphoreInfo(), AcquireUniqueFileResource(), AreaResource, CacheError, _MatrixInfo::columns, DestroyMatrixInfo(), DestroyString(), DiskCache, DiskResource, _MatrixInfo::elements, _MatrixInfo::file, GetEnvironmentValue(), GetMagickModule, IOMode, IsStringTrue(), _MatrixInfo::length, MagickCoreSignature, MagickFalse, MagickTrue, MapBlob(), MapCache, _MatrixInfo::mapped, MapResource, MemoryCache, MemoryResource, _MatrixInfo::path, RelinquishMagickResource(), _MatrixInfo::rows, _MatrixInfo::semaphore, SetMatrixExtent(), _MatrixInfo::signature, _MatrixInfo::stride, _MatrixInfo::synchronize, ThrowMagickException(), and _MatrixInfo::type.
Referenced by CannyEdgeImage(), ConnectedComponentsImage(), HoughLineImage(), and RadonTransform().
MagickExport MatrixInfo * DestroyMatrixInfo | ( | MatrixInfo * | matrix_info | ) |
Definition at line 369 of file matrix.c.
References DiskCache, DiskResource, _MatrixInfo::elements, _MatrixInfo::file, _MatrixInfo::length, LockSemaphoreInfo(), MagickCoreSignature, MagickFalse, MapCache, _MatrixInfo::mapped, MapResource, MemoryCache, MemoryResource, _MatrixInfo::path, RelinquishMagickMemory(), RelinquishMagickResource(), RelinquishSemaphoreInfo(), RelinquishUniqueFileResource(), _MatrixInfo::semaphore, _MatrixInfo::signature, _MatrixInfo::type, UnlockSemaphoreInfo(), and UnmapBlob().
Referenced by AcquireMatrixInfo(), CannyEdgeImage(), ConnectedComponentsImage(), HoughLineImage(), and RadonTransform().
|
inlinestatic |
Definition at line 646 of file matrix.c.
Referenced by GetMatrixElement().
|
inlinestatic |
Definition at line 655 of file matrix.c.
Referenced by GetMatrixElement().
MagickPrivate MagickBooleanType GaussJordanElimination | ( | double ** | matrix, |
double ** | vectors, | ||
const size_t | rank, | ||
const size_t | number_vectors | ||
) |
Definition at line 480 of file matrix.c.
References AcquireQuantumMemory(), GaussJordanSwap, MagickFalse, MagickTrue, PerceptibleReciprocal(), and RelinquishMagickMemory().
Referenced by GenerateCoefficients().
MagickExport size_t GetMatrixColumns | ( | const MatrixInfo * | matrix_info | ) |
Definition at line 609 of file matrix.c.
References _MatrixInfo::columns, MagickCoreSignature, and _MatrixInfo::signature.
Referenced by RadonProjection().
MagickExport MagickBooleanType GetMatrixElement | ( | const MatrixInfo * | matrix_info, |
const ssize_t | x, | ||
const ssize_t | y, | ||
void * | value | ||
) |
Definition at line 705 of file matrix.c.
References _MatrixInfo::columns, DiskCache, EdgeX(), EdgeY(), _MatrixInfo::elements, MagickCoreSignature, MagickFalse, MagickTrue, ReadMatrixElements(), _MatrixInfo::rows, _MatrixInfo::signature, _MatrixInfo::stride, and _MatrixInfo::type.
Referenced by CannyEdgeImage(), ConnectedComponentsImage(), HoughLineImage(), MatrixToImage(), RadonProjection(), and TraceEdges().
MagickExport size_t GetMatrixRows | ( | const MatrixInfo * | matrix_info | ) |
Definition at line 751 of file matrix.c.
References MagickCoreSignature, _MatrixInfo::rows, and _MatrixInfo::signature.
Referenced by RadonProjection().
MagickPrivate void LeastSquaresAddTerms | ( | double ** | matrix, |
double ** | vectors, | ||
const double * | terms, | ||
const double * | results, | ||
const size_t | rank, | ||
const size_t | number_vectors | ||
) |
Definition at line 829 of file matrix.c.
Referenced by GenerateCoefficients().
MagickExport Image * MatrixToImage | ( | const MatrixInfo * | matrix_info, |
ExceptionInfo * | exception | ||
) |
Definition at line 872 of file matrix.c.
References AcquireAuthenticCacheView(), AcquireImage(), ClampToQuantum(), _Image::colorspace, _Image::columns, _MatrixInfo::columns, DestroyCacheView(), DestroyImage(), GetMatrixElement(), GetPixelChannels(), GRAYColorspace, MagickCoreSignature, MagickFalse, MagickTrue, QuantumRange, QueueCacheViewAuthenticPixels(), _Image::rows, _MatrixInfo::rows, _ExceptionInfo::signature, _MatrixInfo::signature, _MatrixInfo::stride, and SyncCacheViewAuthenticPixels().
Referenced by HoughLineImage().
MagickExport MagickBooleanType NullMatrix | ( | MatrixInfo * | matrix_info | ) |
Definition at line 1003 of file matrix.c.
References DiskCache, _MatrixInfo::elements, _MatrixInfo::file, _MatrixInfo::length, MagickCoreSignature, MagickFalse, MagickTrue, _MatrixInfo::rows, _MatrixInfo::signature, and _MatrixInfo::type.
Referenced by HoughLineImage(), and RadonTransform().
|
inlinestatic |
Definition at line 664 of file matrix.c.
References LockSemaphoreInfo(), MAGICK_SSIZE_MAX, MagickMin, and UnlockSemaphoreInfo().
Referenced by GetMatrixElement().
MagickExport double ** RelinquishMagickMatrix | ( | double ** | matrix, |
const size_t | number_rows | ||
) |
Definition at line 1066 of file matrix.c.
References RelinquishMagickMemory().
Referenced by GenerateCoefficients().
MagickExport MagickBooleanType SetMatrixElement | ( | const MatrixInfo * | matrix_info, |
const ssize_t | x, | ||
const ssize_t | y, | ||
const void * | value | ||
) |
Definition at line 1110 of file matrix.c.
References _MatrixInfo::columns, DiskCache, _MatrixInfo::elements, _MatrixInfo::length, MagickCoreSignature, MagickFalse, MagickTrue, _MatrixInfo::signature, _MatrixInfo::stride, _MatrixInfo::type, and WriteMatrixElements().
Referenced by CannyEdgeImage(), ConnectedComponentsImage(), HoughLineImage(), RadonProjection(), RadonTransform(), and TraceEdges().
|
static |
Definition at line 173 of file matrix.c.
References MagickFalse, MagickTrue, and WriteMatrixElements().
Referenced by AcquireMatrixInfo().
|
inlinestatic |
Definition at line 132 of file matrix.c.
References LockSemaphoreInfo(), MAGICK_SSIZE_MAX, MagickMin, and UnlockSemaphoreInfo().
Referenced by SetMatrixElement(), and SetMatrixExtent().