Thursday 24 August 2017

Exponencial Moving Average Iir Filter


Estou trabalhando com uma grande quantidade de séries temporais. Essas séries temporais são basicamente medidas de rede que chegam a cada 10 minutos, e algumas delas são periódicas (ou seja, a largura de banda), enquanto algumas outras arent (ou seja, a quantidade de tráfego de roteamento). Gostaria de um algoritmo simples para fazer uma detecção atípica em linha. Basicamente, eu quero manter na memória (ou no disco) todos os dados históricos para cada série temporal, e eu quero detectar qualquer outlier em um cenário ao vivo (cada vez que uma nova amostra é capturada). Qual é a melhor maneira de alcançar esses resultados Estou atualmente usando uma média móvel para remover um pouco de ruído, mas então o que é seguinte. Simples coisas como o desvio padrão, louco. Contra todo o conjunto de dados não funciona bem (eu não posso assumir que as séries temporais estão estacionárias), e eu gostaria de algo mais preciso, idealmente uma caixa preta como: double outlierdetection (double vector, double value) onde vector é a matriz de dupla contendo Os dados históricos e o valor de retorno são a pontuação de anomalia para o novo valor da amostra. Perguntou 2 de agosto 10 às 20:37 Sim, eu assumi que a freqüência é conhecida e especificada. Existem métodos para estimar a frequência automaticamente, mas isso complicaria consideravelmente a função. Se você precisa estimar a freqüência, tente fazer uma pergunta separada sobre isso - e provavelmente vou fornecer uma resposta, mas precisa de mais espaço do que eu tenho disponível em um comentário. Ndash Rob Hyndman 3 de agosto 10 às 23:40 Uma boa solução terá vários ingredientes, incluindo: Use uma janela resistente, móvel, suave para remover a não-estabilidade. Reexpresse os dados originais para que os resíduos em relação ao liso sejam distribuídos aproximadamente de forma simétrica. Dada a natureza dos seus dados, é provável que suas raízes quadradas ou logaritmos dêem resíduos simétricos. Aplique os métodos do gráfico de controle, ou pelo menos o pensamento da tabela de controle, para os resíduos. No que diz respeito ao último, o pensamento do gráfico de controle mostra que os limiares convencionais, como 2 SD ou 1,5 vezes o IQR além dos quartis, funcionam mal porque provocam muitos sinais falsos fora de controle. As pessoas costumam usar 3 SD no trabalho de tabela de controle, daí 2.5 (ou mesmo 3) vezes o IQR além dos quartis seria um bom ponto de partida. Eu esbocei mais ou menos a natureza da solução Rob Hyndmans, ao mesmo tempo em que adicionei dois pontos principais: o potencial precisa reexpressar os dados e a sabedoria de ser mais conservador na sinalização de um outlier. Não tenho certeza de que Loess seja bom para um detector on-line, no entanto, porque não funciona bem nos pontos finais. Você pode, em vez disso, usar algo tão simples como um filtro de medição móvel (como no alisamento resistente de Tukeys). Se os outliers não vierem em rajadas, você pode usar uma janela estreita (5 pontos de dados, talvez, que serão quebrados apenas com uma explosão de 3 ou mais valores atípicos dentro de um grupo de 5). Depois de ter realizado a análise para determinar uma boa reexpressão dos dados, é improvável que você precise alterar a reexpressão. Portanto, seu detector on-line realmente precisa apenas fazer referência aos valores mais recentes (a última janela) porque não usará os dados anteriores. Se você tiver muito tempo, você poderia avançar para analisar a autocorrelação e a sazonalidade (como flutuações diárias ou semanais recorrentes) para melhorar o procedimento. Respondeu 26 de agosto às 18:02 John, 1.5 IQR é a recomendação original da Tukey39 para os bigodes mais longos em um boxplot e 3 IQR é sua recomendação para marcar pontos como quotfar outliersquot (um riff em uma frase popular de 6039s). Isso é incorporado em vários algoritmos boxplot. A recomendação é analisada teoricamente em Hoaglin, Mosteller, amp Tukey, Understanding Robust e Exploratory Data Analysis. Ndash whuber 9830 out 9 12 at 21:38 Isso confirma dados de séries temporais que tentei analisar. A média da janela e também os desvios padrão de uma janela. ((X - avg) sd) gt 3 parecem ser os pontos que eu quero marcar como outliers. Bem, pelo menos, avisar como outliers, eu sinalizador qualquer coisa superior a 10 sd como extremos extremos outliers. O problema em que eu toco é o que é um comprimento de janela ideal I39m jogando com qualquer coisa entre 4-8 pontos de dados. Ndash NeoZenith 29 de junho 16 às 8:00 Neo Sua melhor aposta pode ser experimentar um subconjunto de seus dados e confirmar suas conclusões com os testes no restante. Você também poderia realizar uma validação cruzada mais formal (mas é necessário um cuidado especial com dados da série temporal devido à interdependência de todos os valores). Ndash whuber 9830 29 jun 16 às 12:10 (Esta resposta respondeu a uma pergunta duplicada (agora fechada) na Detecção de eventos pendentes, que apresentou alguns dados em forma gráfica.) A detecção de ultrapassagem depende da natureza dos dados e do que você é Disposto a assumir sobre eles. Os métodos de uso geral dependem de estatísticas robustas. O espírito desta abordagem é caracterizar a maior parte dos dados de uma forma que não é influenciada por valores aberrantes e, em seguida, apontar para valores individuais que não se enquadram nessa caracterização. Como esta é uma série de tempo, ela acrescenta a complicação da necessidade de (re) detectar outliers de forma contínua. Se isso for feito à medida que a série se desenrola, então só podemos usar dados mais antigos para a detecção, não dados futuros. Além disso, como proteção contra os muitos testes repetidos, gostaríamos de usar um método com falso muito baixo Taxa positiva. Essas considerações sugerem a execução de um teste outlier de janela móvel simples e robusto sobre os dados. Existem muitas possibilidades, mas uma simples, fácil de entender e facilmente implementada é baseada em um MAD em execução: desvio absoluto mediano da mediana. Esta é uma medida fortemente robusta de variação dentro dos dados, semelhante a um desvio padrão. Um pico periférico seria vários MAD ou mais maior que a mediana. Ainda há algum ajuste a ser feito. Quanto de um desvio da maior parte dos dados deve ser considerado periférico e em que ponto de volta no tempo deve ser um aspecto, deixe estes como parâmetros para a experimentação. Heres e uma implementação R aplicada a dados x (1,2, ldots, n) (com n1150 para emular os dados) com valores correspondentes y: Aplicada a um conjunto de dados como a curva vermelha ilustrada na pergunta, produz esse resultado: os dados São mostrados em vermelho, a janela de 30 dias dos limiares da mediana5MAD em cinza e os outliers - que são simplesmente esses valores de dados acima da curva de cinza - em preto. (O limite só pode ser calculado começando no final da janela inicial. Para todos os dados nesta janela inicial, o primeiro limiar é usado: é por isso que a curva cinza é plana entre x0 e x30.) Os efeitos da alteração dos parâmetros são (A) o aumento do valor da janela tenderá a suavizar a curva cinza e (b) o limite crescente aumentará a curva cinza. Sabendo disso, pode-se tomar um segmento inicial dos dados e identificar rapidamente os valores dos parâmetros que melhor segregam os picos periféricos do resto dos dados. Aplique esses valores de parâmetros para verificar o resto dos dados. Se um gráfico mostra que o método está piorando ao longo do tempo, isso significa que a natureza dos dados está mudando e os parâmetros podem precisar ser reajustados. Observe o pouco que este método assume sobre os dados: eles não precisam ser normalmente distribuídos, eles não precisam exibir qualquer periodicidade, eles não precisam ser negativos. Tudo o que presume é que os dados se comportam de maneira razoavelmente similar ao longo do tempo e que os picos periféricos são visivelmente maiores do que o resto dos dados. Se alguém quiser experimentar (ou comparar alguma outra solução com a oferecida aqui), aqui está o código que eu usei para produzir dados como os que estão na pergunta. Estou adivinhando que o modelo sofisticado de séries temporais não funcionará para você por causa do tempo necessário para detectar outliers usando esta metodologia. Portanto, aqui está uma solução alternativa: primeiro estabeleça padrões de tráfego de linha de base por um ano com base na análise manual de dados históricos, que responde por hora do dia, semana, fim de semana, mês do ano, etc. Use essa linha de base, juntamente com algum mecanismo simples (Por exemplo, média móvel sugerida por Carlos) para detectar outliers. Você também pode querer rever a literatura de controle de processo estatístico para algumas idéias. Sim, isso é exatamente o que eu estou fazendo: até agora eu dividir manualmente o sinal em períodos, de modo que para cada um deles eu posso definir um intervalo de confiança dentro do qual o sinal deve ser parado e, portanto, eu posso usar métodos padrão, como Como desvio padrão. O problema real é que não consigo decidir o padrão esperado para todos os sinais que eu tenho que analisar, e é por isso que estou procurando por algo mais inteligente. Ndash gianluca 2 de agosto 10 às 21:37 Aqui está uma idéia: Etapa 1: Implementar e estimar um modelo genérico de séries temporais em uma base única com base em dados históricos. Isso pode ser feito offline. Etapa 2: use o modelo resultante para detectar outliers. Passo 3: em algumas frequências (talvez a cada mês), calibre novamente o modelo da série temporal (isso pode ser feito offline), de modo que a detecção de outliers por etapas 2 não ultrapasse os padrões de tráfego atuais. Isso funcionaria para o seu contexto ndash user28 2 de agosto 10 às 22:24 Sim, isso pode funcionar. Eu estava pensando em uma abordagem semelhante (recomputando a linha de base a cada semana, o que pode ser intensivo em CPU se você tiver centenas de séries temporais univariadas para análise). Entretanto, a verdadeira questão difícil é quot qual é o melhor algoritmo de estilo blackbox para modelar um sinal completamente genérico, considerando o ruído, estimativa de tendência e sazonalidade. AFAIK, cada abordagem na literatura requer uma fase de tuningquot quotparameter muito difícil, e o único método automático que encontrei é um modelo ARIMA da Hyndman (robjhyndmansoftwareforecast). Estou faltando algo ndash gianluca 2 de agosto 10 às 22:38 Novamente, isso funciona muito bem se o sinal for suposto ter uma sazonalidade como essa, mas se eu usar uma série de tempo completamente diferente (ou seja, o tempo médio de ida e volta de TCP ao longo do tempo ), Este método não funcionará (uma vez que seria melhor lidar com aquele com uma média global simples e desvio padrão usando uma janela deslizante contendo dados históricos). Ndash gianluca 2 de agosto 10 às 22:02 A menos que você esteja disposto a implementar um modelo de série de tempo geral (que traz seus contras em termos de latência, etc.) Eu sou pessimista que você encontrará uma implementação geral que, ao mesmo tempo, é simples o suficiente Para trabalhar em todos os tipos de séries temporais. Ndash user28 2 de agosto 10 às 22:06 Outro comentário: eu sei que uma boa resposta pode ser porque você pode estimar a periodicidade do sinal e decidir o algoritmo para usar de acordo com isso, mas eu não encontrei uma boa solução para este. Problema (eu joguei um pouco com análise espectral usando DFT e análise de tempo usando a função de autocorrelação, mas minhas séries temporais contêm muito barulho e esses métodos dão alguns resultados loucos dos tempos) ndash gianluca 2 de agosto 10 às 22:06 A Comente para o seu último comentário: por isso estou procurando uma abordagem mais genérica, mas eu preciso de um tipo de caixa de quotblack porque não posso fazer qualquer suposição sobre o sinal analisado e, portanto, não posso criar o conjunto de parâmetros mais velozes para o algoritmo de aprendizagem. Ndash gianluca 2 de agosto 10 às 22:09 Uma vez que é um dado da série temporal, um filtro exponencial simples em. wikipedia. orgwikiExponentialsmoothing irá suavizar os dados. É um filtro muito bom, pois você não precisa acumular pontos de dados antigos. Compare cada valor de dados recentemente suavizado com o seu valor não suavizado. Uma vez que o desvio excede um certo limiar predefinido (dependendo do que você acredita que um valor de seus dados é negativo), seu outlier pode ser facilmente detectado. Respondeu 30 de abril 15 às 8:50 Você poderia usar o desvio padrão das últimas N medidas (você deve escolher um N adequado). Uma boa pontuação de anomalia seria quantos desvios padrão uma medida é da média móvel. Respondeu 2 de agosto 10 às 20:48 Obrigado pela sua resposta, e se o sinal exibir uma alta sazonalidade (ou seja, muitas medidas de rede são caracterizadas por um padrão diário e semanal ao mesmo tempo, por exemplo, noite vs. dia ou fim de semana Vs dias úteis) Uma abordagem baseada no desvio padrão não funcionará nesse caso. Ndash gianluca 2 de agosto 10 às 20:57 Por exemplo, se eu receber uma nova amostra a cada 10 minutos, e I39m fazendo uma detecção outlier do uso de largura de banda da rede de uma empresa, basicamente às 18h, esta medida cairá (isso é esperado Um padrão normal total), e um desvio padrão calculado sobre uma janela deslizante falhará (porque ele irá ativar um alerta com certeza). Ao mesmo tempo, se a medida cair às 16h (desviando-se da linha de base usual), este é um valor de risco real. Ndash gianluca 2 de agosto 10 às 20:58 o que eu faço é agrupar as medidas por hora e dia da semana e comparar os desvios-padrão dessa. Ainda não correto para coisas como feriados e sazonalidade invernal, mas é correto na maioria das vezes. A desvantagem é que você realmente precisa coletar um ano ou mais de dados para ter o suficiente para que o stddev comece a fazer sentido. A análise espectral detecta periodicidade em séries temporais estacionárias. A abordagem de domínio de freqüência com base na estimativa da densidade espectral é uma abordagem que eu recomendaria como seu primeiro passo. Se, por certos períodos, a irregularidade significa um pico muito maior do que o típico nesse período, a série com tais irregularidades não seria estacionária e a análise espacial espectral não seria apropriada. Mas supondo que você tenha identificado o período que tem as irregularidades, você deve determinar aproximadamente qual seria a altura normal do pico e, em seguida, pode definir um limite em algum nível acima dessa média para designar os casos irregulares. Respondeu 3 de setembro às 14:59 Sugiro o esquema abaixo, que deve ser implementável em um dia ou assim: Coletar tantas amostras quanto você pode segurar na memória Remover outliers óbvias usando o desvio padrão para cada atributo Calcular e armazenar a matriz de correlação E também a média de cada atributo Calcule e armazene as distâncias de Mahalanobis de todas as suas amostras Calculando a outlierness: Para a única amostra da qual você quer saber a sua existência: Recuperar os meios, matriz de covariância e Mahalanobis distância s do treinamento Calcule a distância de Mahalanobis d Para a sua amostra Retorne o percentil em que d cai (usando as distâncias de Mahalanobis do treino). Esse será o seu resultado outlier: 100 é um outlier extremo. PS. Ao calcular a distância Mahalanobis. Use a matriz de correlação, não a matriz de covariância. Isso é mais robusto se as medidas da amostra variarem na unidade e no número. Veja a lista das opções de linha de comando reconhecidas pelas ferramentas da linha de comando ImageMagick. Se você quer uma descrição de uma opção específica, clique no nome da opção na barra de navegação acima e você irá direto para ela. Salvo indicação em contrário, cada opção é reconhecida pelos comandos: converte e mogrifique. - adaptive-blur radius x sigma Adaptativamente borrar pixels, com efeito decrescente perto de bordas. É utilizado um operador gaussiano do raio dado e desvio padrão (sigma). Se sigma não for dado padrão para 1. - adaptive-redimensionar geometria Redimensionar a imagem usando triangulação dependente de dados. Consulte Geometria de imagem para obter detalhes completos sobre o argumento da geometria. A opção - adaptive-redimensionar padrão é a triangulação dependente de dados. Use o filtro para escolher um algoritmo de revezagem diferente. Os deslocamentos, se presentes na cadeia de geometria, são ignorados e a opção - gravidade não tem efeito. - adaptive-sharpen radius x sigma Adaptativamente afiar pixels, com efeito crescente perto de bordas. É utilizado um operador gaussiano do raio dado e desvio padrão (sigma). Se o sigma não for dado, assume como padrão 1. Junte as imagens a um único arquivo multi-imagem. Essa opção é ativada por padrão. Uma tentativa é feita para salvar todas as imagens de uma seqüência de imagem no arquivo de saída fornecido. No entanto, alguns formatos, como JPEG e PNG, não suportam mais do que uma imagem por arquivo e, nesse caso, o ImageMagick é obrigado a gravar cada imagem como um arquivo separado. Como tal, se mais de uma imagem precisa ser escrita, o nome do arquivo fornecido é modificado pela adição de um número - cene antes do sufixo, para criar nomes distintos para cada imagem. Use adjacente para forçar cada imagem a ser escrita para separar arquivos, seja ou não o formato do arquivo permite múltiplas imagens por arquivo (por exemplo, GIF, MIFF e TIFF). A inclusão de uma string de formato inteiro de estilo C no nome do arquivo de saída habilitará automágalamente adjacente e será usada para especificar onde o número - cene é colocado nos nomes dos arquivos. Essas cadeias de caracteres, como d ou 03d, são familiares para aqueles que usaram a função de biblioteca C (printf) padrão. Como exemplo, o comando criará uma seqüência de 17 imagens (os dois dados mais 15 mais criados por - morph), denominados my00morph. jpg, my01morph. jpg, my02morph. jpg. My16morph. jpg. Em resumo, o ImageMagick tenta escrever todas as imagens em um arquivo, mas irá salvar em vários arquivos, se houver alguma das seguintes condições. O formato do arquivo de imagens de saída não permite arquivos de imagens múltiplas, a opção adjacente é fornecida, ou uma string de formato de inteiro inteiro printf (): (ex: d) está presente no nome do arquivo de saída. - finine s x. R x. R y. S y, t x. T Configura a matriz de transformação de desenho para rotação e escala combinadas. Esta opção define uma matriz de transformação, para uso por opções subseqüentes - draw ou - transform. As entradas da matriz são inseridas como valores numéricos separados por vírgulas entre citações ou sem espaços. Internamente, a matriz de transformação tem 3x3 elementos, mas três deles são omitidos da entrada porque são constantes. As novas coordenadas (transformadas) (x. Y) de um pixel na posição (x. Y) na imagem original são calculadas usando a seguinte equação matricial. O tamanho da imagem resultante é o do menor retângulo que contém a imagem de origem transformada. Os parâmetros t x e t e posteriormente deslocam os pixels da imagem para que aqueles que são movidos para fora da área da imagem são cortados. A matriz de transformação é compatível com o sistema de coordenadas de pixels esquerdo: as direções positivas x e y estão para a direita e para baixo, resp. A rotação positiva é no sentido horário. Se os coeficientes de tradução t x e t y forem omitidos, eles são padrão para 0,0. Portanto, quatro parâmetros são suficientes para rotação e dimensionamento sem tradução. A escala pelos fatores s x e s y nas direções x e y, respectivamente, é realizada com o seguinte. Veja - transformar. E o método - distort Projeção Affine para mais informações A tradução por um deslocamento (tx. Ty) é realizada assim: Gire no sentido horário sobre a origem (o canto superior esquerdo) de um ângulo a, deixando c cos (a), s sin (A), e usando o seguinte. O efeito cumulativo de uma sequência de transformações de - finina pode ser conseguido, em vez disso, por uma única operação de alfa usando a matriz igual ao produto das matrizes das transformações individuais. Uma tentativa é feita para detectar matrizes de transformação quase singelas. Se o determinante da matriz tiver um valor absoluto suficientemente pequeno, ele é rejeitado. - alpha Dá o controle do canal de uma imagem de um alfabeto. Usado para definir uma bandeira em uma imagem indicando se deve ou não usar dados de canal alfa existentes, para criar um canal alfa ou para executar outras operações no canal alfa. Escolha o tipo de argumento da lista abaixo. Ativar Ativar o canal de transparência de imagens. Nota normalmente O conjunto deve ser usado em vez disso, a menos que você precise preservar o canal de transparência existente (mas especificamente desligado). Associar associe o canal alfa à imagem. Desativar Desativa o canal de transparência das imagens. Não exclui ou altera os dados existentes, simplesmente desliga o uso desses dados. Desassociar desassociar o canal alfa da imagem. Set Ativa o canal alfanumérico. Se já estivesse desligado, ele também reinicia o canal para opaco. Se a imagem já tivesse o canal alfa ativado, não terá efeito. Opaque Permite o canal alfabético e força-o a ser completamente opaco. Transparente Ativa o canal alfabético e o obriga a ser totalmente transparente. Isso efetivamente cria uma imagem totalmente transparente do mesmo tamanho que o original e com todos os seus dados originais RGB ainda intactos, mas totalmente transparente. Extrair Copia os valores do canal alfa em todos os canais de cores e desliga a transparência das imagens, de modo a gerar uma máscara de escala de cinza da forma das imagens. Os dados do canal alfa são deixados intactos apenas desativados. Este é o inverso da cópia. Copiar Activa o canal alfabético e, em seguida, copia a intensidade de escala de cinza da imagem, no canal alfa, convertendo uma máscara de escala de cinza em uma máscara de formato transparente pronta para ser colorida adequadamente. Os canais de cores não são modificados. Forma conforme a cópia, mas também colora a máscara de forma resultante com a cor de fundo atual. Isso é que os canais de cores RGB são substituídos, com a forma alfa apropriada. Remova a imagem compós sobre a cor de fundo. Fundo Defina qualquer pixel totalmente transparente para a cor de fundo, deixando-o totalmente transparente. Isso pode fazer alguns formatos de arquivo de imagem, como PNG, menores, pois os valores RGB de pixels transparentes são mais uniformes e, assim, podem comprimir melhor. Note-se que, enquanto a operação matte obsoleta era a mesma que - alpha Off, a operação "matte" era a mesma que - alpha Set e não - alpha On. - alph-color color Especifica a cor a ser usada com a opção - frame. A cor é especificada usando o formato descrito na opção - fill. A cor matte padrão é BDBDBD. Essa tonalidade de cinza. Esta é uma opção IMv7, use mattecolor com IMv6. - anotar graus de texto - anotar Xdegrees x Ydegrees de texto - anotar Xdegrees x Ydegrees t x t y text - anotar t x t y text Anotar uma imagem com texto Esta é uma conveniência para anotar uma imagem com texto. Para um controle mais preciso das anotações de texto, use - draw. Os valores Xdegrees e Ydegrees controlam as tesouras aplicadas ao texto, enquanto t x e t y são offsets que dão à localização do texto relativa qualquer configuração de gravidade e padrões no canto superior esquerdo da imagem. O uso de graus de anotar ou - grandes graus x graus produz uma rotação desobstruída do texto. A direção da rotação é positiva, o que significa uma rotação no sentido horário se os graus forem positivos. (Isto está de acordo com a convenção matemática usual, uma vez que se percebe que a direção positiva do y é convencionalmente considerada como descendente para as imagens). As novas coordenadas (transformadas) (x. Y) de um pixel na posição (x. Y) na A imagem é calculada usando a seguinte equação matricial. Se t x e t y são omitidos, eles são padrão para 0. Isso faz com que o canto inferior esquerdo do texto se torne o canto superior esquerdo da imagem, o que provavelmente não é desejável. Adicionar uma opção de graça neste caso leva a bons resultados. O texto é qualquer sequência de caracteres codificados UTF-8. Se o texto for da forma mytext. txt, o texto será lido no arquivo mytext. txt. Texto em um arquivo é tomado literalmente, nenhum caractere de formatação incorporado é reconhecido. - antialias EnableDisable da renderização de pixels anti-aliasing ao desenhar fontes e linhas. Por padrão, objetos (por exemplo, texto, linhas, polígonos, etc.) são anti-alinhados quando desenhados. Use antialias para desativar a adição de pixels de borda antialias. Isso reduzirá o número de cores adicionadas a uma imagem apenas para as cores serem desenhadas diretamente. Ou seja, não são adicionadas cores misturadas ao desenhar esses objetos. Junte as imagens atuais verticalmente ou horizontalmente. Esta opção cria uma única imagem mais longa, juntando todas as imagens atuais em seqüência de cima para baixo. Use anexar para empilhar imagens da esquerda para a direita. Se eles não tiverem a mesma largura, as imagens mais estreitas são preenchidas com a configuração atual da cor do plano de fundo, e sua posição relativa entre si pode ser controlada pela configuração de gravidade atual. - valor de atenuação diminua (ou intensifique) ao adicionar ruído a uma imagem. Se não for definido, o valor é equivalente a 1,0, ou uma adição de ruído máxima - autenticar senha Decodificar um PDF com uma senha. Use esta opção para fornecer uma senha para descriptografar um PDF criptografado usando a Microsoft Crypto API (MSC API). A criptografia usando a API MSC não é suportada. Para um método de criptografia diferente, veja - encipher e - decipher. - auto-gamma Ajuste automatizamente o nível de imagem da gama. Isso calcula os valores médios de uma imagem e, em seguida, aplica um ajuste - gam-calculado, de modo que a cor média existe na imagem que receberá um valor de 50. Isso significa que qualquer imagem cinza sólida torna-se 50 cinza. Isso funciona bem para imagens da vida real com poucas ou nenhuma área extrema escura e clara, mas tendem a falhar para imagens com grandes quantidades de céu brilhante ou sombras escuras. Também não funciona bem para diagramas ou imagens como imagens. Ele usa a configuração - channel (incluindo o sinalizador de sincronização para sincronização de canal), para determinar quais valores de cor são usados ​​e modificados. Como a configuração de canal padrão é RGB, sincronização, os canais são modificados em conjunto pelo mesmo valor de gama, preservando as cores. - auto-level Ajuste automatizamente os níveis de cores da imagem. Este é um operador de normalização de imagem perfeito. Ele encontra os valores de cor mínima e máxima exata na imagem e, em seguida, aplica um operador de nível para esticar os valores para a gama completa de valores. O operador normalmente não é usado para imagens de vida real, varredura de imagem ou imagens de formato JPEG, pois um único pixel externo pode definir valores minmax ruins para a operação de nível. Por outro lado, é o operador certo usar para imagens de gradiente de alongamento de cor usadas para gerar tabelas de pesquisa de cores, mapas de distorção ou outras imagens especificadas matematicamente. O operador é muito semelhante ao - normalizar. - contra-estiramento. E - operadores de extensão linear, mas sem problemas de trechos ou de recorte de histograma que esses operadores possam ter. Isso é - auto-level é a versão perfeita ou ideal desses operadores. Ele usa a configuração - canal (incluindo o sinalizador de sincronização especial para sincronização de canais), para determinar quais valores de cor são usados ​​e modificados. Como a configuração de canal padrão é RGB, sincronizar, a sincronização garante que os canais de cores serão modificados em conjunto pelo mesmo valor de gama, preservando as cores e ignorando a transparência. - auto-orient ajusta uma imagem de modo que sua orientação seja adequada para visualização (ou seja, orientação superior esquerda). Este operador lê e redefine a configuração de perfil de imagem EXIF ​​Orientação e, em seguida, executa a rotação apropriada de 90 graus na imagem para orientar a imagem, para visualização correta. Esta configuração de perfil EXIF ​​geralmente é configurada usando um sensor de gravidade na câmera digital, no entanto fotos tiradas diretamente para baixo ou para cima podem não ter um valor apropriado. Também as imagens que foram orientadas corrigidas sem reativar esta configuração, podem ser corrigidas novamente resultando em um resultado incorreto. Se o perfil EXIF ​​foi previamente removido, o operador - auto-orientador não fará nada. Média de um conjunto de imagens. Um erro resulta se as imagens não tiverem tamanho idêntico. Exibir a imagem centrada em um pano de fundo. Este pano de fundo cobre toda a tela da estação de trabalho e é útil para ocultar outras atividades da janela X enquanto visualiza a imagem. A cor do contexto é especificada como cor de fundo. A cor é especificada usando o formato descrito na opção - fill. - cor do plano de fundo Defina a cor do plano de fundo. A cor é especificada usando o formato descrito na opção - fill. A cor de fundo padrão (se nenhuma for especificada ou encontrada na imagem) é branca. - bench iterations Repita o comando inteiro para o número dado de iterações e relata o tempo de usuário e o tempo decorrido. Por exemplo, considere o seguinte comando e sua saída. Modifique o benchmark com a - duration para executar o benchmark por um número fixo de segundos e - concurrente para executar benchmark em paralelo (requer o recurso OpenMP). Neste exemplo, 5 iterações foram completadas em 2.174 iterações por segundo, usando 3 threads e 3.190 segundos do tempo atribuído pelo usuário, por um tempo total decorrido de 2.300 segundos. - bias value Add bias ao convolver uma imagem. Esta opção desloca a saída de x2011convolve para que resultados positivos e negativos sejam relativos ao valor de polarização especificado. Isso é importante para compilações não-HDRI do ImageMagick quando se trata de convoluções que contêm valores negativos e positivos. Este é especialmente o caso com convoluções envolvendo filtros de passagem alta ou detecção de borda. Sem um viés de saída, os valores negativos são cortados em zero. Ao usar um ImageMagick com a configuração de tempo de compilação HDRI, x2011bias não é necessário, pois o ImageMagick pode armazenar quaisquer resultados negativos sem recortar o intervalo de valores de cor (0..QuantumRange). Veja a discussão sobre as implementações do HDRI do ImageMagick na página High Dynamic-Range Images. Para mais informações sobre o HDRI, vá nas páginas de Uso do ImageMagick ou na entrada da Wikipedia. - black-point-compensation Use a compensação do ponto preto. - black-threshold value Força para pregar todos os pixels abaixo do limite enquanto deixa todos os pixels iguais ou superiores ao limite inalterado. O valor de limiar pode ser dado como uma porcentagem ou como um número inteiro absoluto dentro de 0, QuantumRange correspondente ao valor de x2011channel desejado. Veja x2011threshold para mais detalhes sobre limiares e valores resultantes. - a geometria de mistura mistura uma imagem em outra pelo valor ou percentual absoluto dado. A mistura significará as imagens em conjunto (mais) de acordo com as porcentagens dadas e cada transparência de pixels. Se apenas um único valor de porcentagem for dado, ele define o peso da imagem composta ou fonte, enquanto a imagem de fundo é ponderada pela quantidade exata oposta. Isso é um - blend 30 combina 30 da imagem de origem com 70 da imagem de destino. Assim, é equivalente a - blend 30x70. - blue-primary x. Y Defina o ponto principal da cromaticidade azul. O fator de mudança de voz simula uma cena durante a noite ao luar. Comece com um fator de 1,5 - branco de raio-raio de borrão x sigma Reduza o ruído da imagem e reduza os níveis de detalhes. Convide a imagem com uma distribuição gaussiana ou normal usando o valor Sigma dado. A fórmula é: O valor Sigma é o argumento importante e determina a quantidade real de desfocagem que ocorrerá. O Radius é usado apenas para determinar o tamanho da matriz que manterá a distribuição gaussiana calculada. Deve ser um número inteiro. Se não for dado ou definido como zero, o IM calculará o maior raio possível que proporcionará resultados significativos para a distribuição Gaussiana. Quanto maior o raio, mais lento é a operação. No entanto, um raio muito pequeno. E os efeitos de alias podem ser severos. Como orientação, Radius deve ser pelo menos duas vezes o valor Sigma, embora três vezes ele produz um resultado mais preciso. Esta opção difere do "borrão de alegria" simplesmente aproveitando as propriedades de separabilidade da distribuição. Aqui aplicamos uma matriz gaussiana de uma única dimensão na direção horizontal, em seguida, repita o processo na direção vertical. A configuração - virtual-pixel determinará como os pixels que estão fora da imagem adequada são borrados no resultado final. - geometria frontal: rode a imagem com uma borda de cor. Defina a largura e a altura usando a parte do tamanho do argumento da geometria. Consulte Geometria de imagem para obter detalhes completos sobre o argumento da geometria. Os deslocamentos são ignorados. A partir de IM 6.7.8-8, os argumentos da geometria se comportam da seguinte forma: o valor do valor é adicionado ao valor do direito e do topbottom x x o valor x é adicionado apenas ao direito direito e o topbottom é inalterado x valor-y valor-y é adicionado Apenas para topbottom e leftright são inalterados value-x x value-y value-x é adicionado a leftright e value-y added to topbottom value-x x 0 value-x é adicionado apenas a leftright e topbottom são inalterados 0 x value-y O valor-y é adicionado apenas ao topbottom e o direito é inalterável. O valor do valor da largura é adicionado ao direito e o valor da altura é adicionado ao valor do topbottom-x x o valor-x da largura é adicionado ao direito e ao valor do valor superior x valor de y Y de altura é adicionado ao topo e ao valor desejado-x x valor - y valor-x de largura é adicionado ao direito desejado e o valor-y da altura é adicionado ao valor do topbottom-x x 0 valor-x da largura é adicionado ao lado esquerdo E topbottom são inalterados 0 x valor-y valor-y de altura é adicionado ao topbottom e leftright são inalterados Defina o border colo R, precedendo com a configuração - bordercolor. A operação - border é afetada pela configuração de concomposição atual e assume que este está usando o método de composição Over Over. Ele gera uma imagem das cores de tamanho apropriadas pelo atual - bordercolor antes de sobrepor a imagem original no centro desta imagem de rede. Isso significa que, com o método de composição padrão de Over, todas as partes transparentes podem ser substituídas pela configuração atual do "bordercolor". Veja também a opção frame-frame, que possui mais funcionalidade. - bordercolor colorina Defina a cor da borda. A cor é especificada usando o formato descrito na opção - fill. A cor da borda padrão é DFDFDF. Essa tonalidade de cinza. Observe que o espaço de cores scRGB requer suporte HDRI, caso contrário ele se comporta como RGB linear. Combine uma ou mais imagens em uma única imagem. Os canais (previamente definidos por - channel) da imagem combinada são retirados dos valores em escala de cinza de cada imagem na sequência, na ordem. Para a configuração de canal padrão de RGB. Isto significa que a primeira imagem é atribuída ao canal vermelho, o segundo ao canal verde, o terceiro ao azul. Esta opção pode ser pensada como inversa para - separate. Desde que as configurações do canal sejam as mesmas. Assim, no exemplo a seguir, a imagem final deve ser uma cópia do original. - conceja obrigatória Insira um comentário em uma imagem. Esta opção define os meta-dados de comentários de uma imagem lida depois que esta opção foi dada. Para modificar um comentário de imagens já na memória use - set comment. O comentário pode conter caracteres de formato especiais listados nas Propriedades de imagem de formato e impressão. Esses atributos são expandidos quando o comentário é finalmente atribuído às imagens individuais. Se o primeiro caracter do string for. O comentário da imagem é lido a partir de um arquivo intitulado pelos caracteres restantes na string. Os comentários lidos a partir de um arquivo são literais, não são reconhecidos caracteres de formatação incorporados. Os metadados do comentário não são visíveis na própria imagem. Para fazer isso, use as opções - annote ou - draw em vez disso. Produz um comentário de imagem de MIFF: bird. miff 512x480 (assumindo que a imagem bird. miff tem uma largura de 512 e uma altura de 480. anota matematicamente e visualmente a diferença entre uma imagem e sua reconstrução Esta é uma versão de conversão de comparar para Duas imagens do mesmo tamanho. A sintaxe é a seguinte, mas outras métricas são permitidas. Para obter o valor da métrica, use a distorção do formato da seqüência. - o operador complexo realiza matemática complexa em uma seqüência de imagem Escolha entre esses operadores: Opcionalmente, especifique o operador de divisão SNR com - complexo definitivo: snrfloat. - composição de operador Defina o tipo de composição da imagem. Veja o Alpha Compositing para uma discussão detalhada sobre a composição aérea. Esta configuração efetua a operação de processamento de imagens que combinam duas (ou mais) imagens de alguma forma. Isso inclui os operadores --compare. - composite. - layers composite, - flatten. - mosaic. - layers fundir, - border.-frame e - extent. É também uma das principais opções para o comando composto. - co Mposite Execute a composição alfa em duas imagens e uma máscara opcional Pegue o primeiro destino da imagem e sobreponha a segunda imagem de origem de acordo com a configuração de montagem atual. A localização da fonte ou imagem de sobreposição é controlada de acordo com a gravidade. E - configurações de geometria. Se uma terceira imagem for dada, isso é tratado como uma imagem de máscara de mistura de escala de cinza em relação à primeira imagem de destino. Esta máscara é combinada com a imagem de origem. No entanto, para o método de compor deslocar, a máscara é usada para fornecer uma imagem de deslocamento Y separada. Se um método - composição requer argumentos numéricos adicionais ou sinalizadores estes podem ser fornecidos definindo a opção - set: compor: args adequadamente para o método de composição. Alguns métodos de preenchimento podem modificar a imagem de destino fora da área de sobreposição. Você pode desabilitar isso configurando a opção especial - set: compor: exterior-sobreposição para falso. A especificação de composição de SVG exige que os valores de cor e opacidade variem entre zero e QuantumRange inclusive. Você pode permitir valores fora deste intervalo com esta opção: opção - set: compor: clampfalse - compress type Use a compactação de pixels especificada pelo tipo ao escrever a imagem. As opções são: Nenhuma. BZip. Fax. Grupo4. JPEG. JPEG2000. Sem perdas. LZW. RLE ou Zip. Para imprimir uma lista completa de tipos de compressão, use - list compress. Especifique a compressa para armazenar a imagem binária em um formato descompactado. O padrão é o tipo de compressão do arquivo de imagem especificado. Se a compressão LZW for especificada, mas a compressão LZW não foi ativada, os dados da imagem são escritos em um formato LZW não compactado que pode ser lido por descodificadores LZW. Isso pode resultar em arquivos GIF maiores do que o esperado. Lossless refere-se a JPEG sem perdas, que só está disponível se a biblioteca JPEG tiver sido corrigida para suportá-la. O uso de JPEG sem perdas geralmente não é recomendado. Ao escrever um arquivo ICO, você pode solicitar que as imagens sejam codificadas no formato PNG, especificando a compressão Zip. Ao escrever um arquivo JNG, especifique a compressão Zip para solicitar que o canal alfa seja codificado no formato PNG IDAT ou JPEG para solicitar que ele seja codificado no formato JPG JDAA. Use a opção - quality para configurar o nível de compressão a ser usado por codificadores JPEG, PNG, MIFF e MPEG. Use a opção - sampling-factor para definir o fator de amostragem a ser usado por codificadores JPEG, MPEG e YUV para amostragem dos canais de croma. - conectividade de componentes conectados conectados - a rotulação de componentes detecta regiões conectadas em uma imagem, escolha conectividade de 4 ou 8 vias. Use - define os componentes conectados: verbosetrue para produzir estatísticas associadas a cada rótulo exclusivo. Melhore ou reduza o contraste da imagem. Esta opção aumenta as diferenças de intensidade entre os elementos mais claros e mais escuros da imagem. Use-contraste para melhorar a imagem ou o contraste para reduzir o contraste da imagem. Para um efeito mais acentuado, você pode repetir a opção: - ponto negro preto-ponto-contraste-estiramento, estiramento alongado. Aumentar o contraste em uma imagem esticando a amplitude de valores de intensidade. Ao executar o estiramento, black-out na maioria dos pixels de ponto preto e branco na maioria dos pixels de ponto branco. Ou, se o percentual for usado, black-out na maioria dos pixels do ponto preto e branco na maioria dos pixels do ponto branco. Antes do ImageMagick 6.4.7-0, o contraste-alongamento será apagado na maioria dos pixels no ponto preto e em branco na maioria dos pixels totais menos pixels em pontos brancos. Ou, se o percentual for usado, black-out na maioria dos pixels do ponto preto e branco-out no máximo 100 pixels menos pontos brancos. Observe que o contraste-alongamento 0 modificará a imagem de modo que os valores mínimos e máximos das imagens sejam esticados para 0 e QuantumRange. Respectivamente, sem perda de dados devido a queima ou corte em qualquer extremidade. Isso não é o mesmo que - normalizar. O que equivale a um contraste de 0.15x0.05 (ou anterior ao ImageMagick 6.4.7-0, - contast-stretch 2x99). O operador interno funciona criando uma bandeja de histograma e, em seguida, usa essa caixa para modificar a imagem. Como tal, algumas cores podem ser combinadas quando originalmente caíram na mesma lixeira. Todos os canais são normalizados em concerto pela mesma quantidade, de modo a preservar a integridade das cores, quando a configuração de canal padrão está em uso. Especificar qualquer outra configuração de canal irá normalizar os canais RGB de forma independente. Veja também - auto-level para uma perfeita normalização de imagens matemáticas. Este operador está em revisão para o desenvolvimento. - convolver kernel Convide uma imagem com um kernel de convolução fornecido pelo usuário. O kernel é uma matriz especificada como uma lista separada por vírgulas de inteiros (sem espaços), ordenada da esquerda para a direita, começando com a linha superior. Atualmente, apenas os kernels de dimensionamento ímpar são suportados e, portanto, o número de entradas no kernel especificado deve ser 3 2 9, 5 2 25, 7 2 49, etc. Observe que o operador x2011convolve suporta a configuração x2011bias. Esta opção desloca a convolução para que resultados positivos e negativos sejam relativos a um valor de polarização especificado pelo usuário. Isso é importante para compilações não-HDRI do ImageMagick quando se trata de convoluções que contêm valores negativos e positivos. Este é especialmente o caso com convoluções envolvendo filtros de passagem alta ou detecção de borda. Sem um viés de saída, os valores negativos são cortados em zero. Ao usar um ImageMagick com a configuração de tempo de compilação HDRI, x2011bias não é necessário, pois o ImageMagick pode armazenar quaisquer resultados negativos sem recortar o intervalo de valores de cor (0..QuantumRange). Veja a discussão sobre as implementações do HDRI do ImageMagick na página High Dynamic-Range Images. Para mais informações sobre o HDRI, vá nas páginas de Uso do ImageMagick ou na entrada da Wikipedia. - a geometria da cópia desloca os pixels da cópia de uma área de uma imagem para outra. - prop geometria Corte uma ou mais regiões retangulares da imagem. Consulte Geometria de imagem para obter detalhes completos sobre o argumento da geometria. A largura e a altura do argumento de geometria dão o tamanho da imagem que permanece após o corte, e x e y no deslocamento (se presente) dão a localização do canto superior esquerdo da imagem recortada em relação à imagem original. Para especificar o valor a ser removido, use - shave em vez disso. Se os deslocamentos x e y estiverem presentes, uma única imagem é gerada, consistindo nos pixels da região de corte. Os deslocamentos especificam a localização do canto superior esquerdo da região de corte medido para baixo e para a direita em relação ao canto superior esquerdo da imagem. Se a opção - gravity estiver presente com o NorthEast. Leste. Ou a gravidade do Sudeste, dá a distância para a esquerda do lado direito da imagem para a borda direita da região de corte. Da mesma forma, se a opção - gravity estiver presente com a SouthWest. Sul. Ou a gravidade do Sudeste, a distância é medida para cima entre as bordas inferiores. Se os deslocamentos x e y são omitidos, um conjunto de telhas da geometria especificada, cobrindo toda a imagem de entrada, é gerado. As telhas mais à direita e as telhas inferiores são menores se a geometria especificada for além das dimensões da imagem de entrada. Você pode adicionar o argumento de geometria para dividir a imagem com o número de telhas geradas. Ao adicionar uma bandeira de caracteres de exclamação ao argumento de geometria, o tamanho e o deslocamento da página de lona virtual de imagens recortadas são definidos como se o argumento de geometria fosse uma janela de exibição ou uma janela. Isso significa que o tamanho da página da tela está configurado exatamente para o mesmo tamanho que você especificou, o deslocamento da imagem ajustado no canto superior esquerdo superior da região cortada. Se a imagem cortada perdeu a imagem real em sua tela virtual, uma imagem perdida transparente de um pixel especial é retornada, e uma colheita perdeu o aviso. Pode ser necessário repetir a imagem antes de cortar a imagem para garantir que a moldura de coordenadas de colheita seja deslocada para o canto superior esquerdo da imagem visível. Da mesma forma, você pode querer usar repage após o corte para remover o deslocamento da página que será deixado para trás. Isto é especialmente verdadeiro quando você vai escrever para um formato de imagem, como PNG que suporte um deslocamento de imagem. - quantidade de carro desloca o mapa de cores da imagem por quantidade. A quantidade define o número de posições que cada entrada de mapa de cores é deslocada. - os eventos de erro permitem a impressão debug. O parâmetro de eventos especifica quais eventos devem ser registrados. Pode ser não. Todos. Vestígio. Ou uma lista separada por vírgulas, consistindo de um ou mais dos seguintes domínios: Acelerar. Anotar. Blob. Cache. Coder. Configure. Deprecate. Exceção. Localidade. Renderizar. Recurso. Segurança. TemporaryFile. Transformar. X11. Ou Usuário. Por exemplo, para registrar eventos de cache e blob, use. O domínio do usuário está normalmente vazio, mas os desenvolvedores podem registrar eventos do usuário em sua cópia privada do ImageMagick. Para imprimir a lista completa de métodos de depuração, use - list debug. Use a opção - log para especificar o formato para a saída de depuração. Use debug para desligar todo o log. A depuração também pode ser definida usando a variável de ambiente MAGICKDEBUG. Os valores permitidos para a variável de ambiente MAGICKDEBUG são os mesmos que para a opção - debug. - decipher filename Decipher e restaurar pixels que foram previamente transformados por - encipher. Obtenha a senha do arquivo especificado pelo nome do arquivo. Descreva a busca de áreas que mudaram entre as imagens Dada uma seqüência de imagens do mesmo tamanho, tal como produzido por "coalesce". replace the second and later images, with a smaller image of just the area that changed relative to the previous image. The resulting sequence of images can be used to optimize an animation sequence, though will not work correctly for GIF animations when parts of the animation can go from opaque to transparent. This option is actually equivalent to the - layers method compare-any . - define key . add specific global settings generally used to control coders and image processing operations. This option creates one or more definitions for coders and decoders to use while reading and writing image data. Definitions are generally used to control image file format coder modules, and image processing operations, beyond what is provided by normal means. Defined settings are listed in - verbose information ( info: output format) as Artifacts. If value is missing for a definition, an empty-valued definition of a flag is created with that name. This used to control onoff options. Use define key to remove definitions previously created. Use define to remove all existing definitions. The same artifact settings can also be defined using the - set option: key value option, which also allows the use of Format and Print Image Properties in the defined value. The option and key are case-independent (they are converted to lowercase for use within the decoders) while the value is case-dependent. Such settings are global in scope, and affect all images and operations. The following definitions are just some of the artifacts that are available: include any alpha channel when writing in the BMP image format. valid values are bmp2. bmp3. and bmp4. This option can be useful when the method of prepending BMP2: to the output filename is inconvenient or is not available, such as when using the mogrify utility. prevent automatic conversion to grayscale inside coders that support grayscale. This should be accompanied by - type truecolor. PNG and TIF do not need this define. With PNG, just use PNG24:image. With TIF, just use - type truecolor. JPG and PSD will need this define. Set the divide SNR constant-complex Sets certain compose argument values when using convert. - compose. - composite. See Image Composition set each pixel whose value is below zero to zero and any the pixel whose value is above the quantum range to the quantum range (e. g. 65535) otherwise the pixel value remains unchanged. Define supported in ImageMagick 6.9.1-3 and above. Merges any region with area smaller than value into its surrounding region or largest neighbor. Comma andor hyphenated list of id values to keep in the output. Supported in Imagemagick 6.9.3-0. Changes the output image from id values to mean color values. Supported in Imagemagick 6.9.2-8. Comma andor hyphenated list of id values to remove from the output. Supported in Imagemagick 6.9.2-9. For example, to create a postscript file that will render only the black pixels of a bilevel image, use: Set attributes of the image registry by prefixing the value with registry. For example, to set a temporary path to put work files, use: - delay ticks - delay ticks x ticks-per-second display the next image after pausing. This option is useful for regulating the animation of image sequences ticksticks-per-second seconds must expire before the display of the next image. The default is no delay between each showing of the image sequence. The default ticks-per-second is 100. Use gt to change the image delay only if its current value exceeds the given delay. lt changes the image delay only if current value is less than the given delay. For example, if you specify 30gt and the image delay is 20, the image delay does not change. However, if the image delay is 40 or 50, the delay it is changed to 30. Enclose the given delay in quotation marks to prevent the lt or gt from being interpreted by your shell as a file redirection. - delete indexes delete the images specified by index, from the image sequence. Specify the image by its index in the sequence. The first image is index 0. Negative indexes are relative to the end of the sequence, for example, -1 represents the last image of the sequence. Specify a range of images with a dash (e. g. 0-4). Separate indexes with a comma (e. g. 0,2). Use delete to delete the last image in the current image sequence. Use - delete 0--1 to delete the entire image sequence. - density width - density width x height Set the horizontal and vertical resolution of an image for rendering to devices. This option specifies the image resolution to store while encoding a raster image or the canvas resolution while rendering (reading) vector formats such as Postscript, PDF, WMF, and SVG into a raster image. Image resolution provides the unit of measure to apply when rendering to an output device or raster image. The default unit of measure is in dots per inch (DPI). The - units option may be used to select dots per centimeter instead. The default resolution is 72 dots per inch, which is equivalent to one point per pixel (Macintosh and Postscript standard). Computer screens are normally 72 or 96 dots per inch, while printers typically support 150, 300, 600, or 1200 dots per inch. To determine the resolution of your display, use a ruler to measure the width of your screen in inches, and divide by the number of horizontal pixels (1024 on a 1024x768 display). If the file format supports it, this option may be used to update the stored image resolution. Note that Photoshop stores and obtains image resolution from a proprietary embedded profile. If this profile is not stripped from the image, then Photoshop will continue to treat the image using its former resolution, ignoring the image resolution specified in the standard file header. The - density option sets an attribute and does not alter the underlying raster image. It may be used to adjust the rendered size for desktop publishing purposes by adjusting the scale applied to the pixels. To resize the image so that it is the same size at a different resolution, use the - resample option. - depth value depth of the image. This the number of bits in a color sample within a pixel. Use this option to specify the depth of raw images whose depth is unknown such as GRAY, RGB, or CMYK, or to change the depth of any image after it has been read. obtain image by descending window hierarchy. - deskew threshold render text right-to-left or left-to-right. - displace horizontal-scale - displace horizontal-scale x vertical-scale shift image pixels as defined by a displacement map. With this option, the overlay image, and optionally the mask image, is used as a displacement map, which is used to displace the lookup of what part of the background image is seen at each point of the overlaid area. Much like the displacement map is a lens that redirects light shining through it so as to present a distorted view the original background image behind it. Any perfect grey areas of the displacement map produce a zero displacement of the image. Black areas produce the given maximum negative displacement of the lookup point, while white produce a maximum positive displacement of the lookup. Note that it is the lookup of the background that is displaced, not a displacement of the image itself. As such an area of the displacement map containing white will have the lookup point shifted by a positive amount, and thus generating a copy of the destination image to the rightdownward from the correct position. That is the image will look like it may have been shifted in a negative leftupward direction. Understanding this is a very important in understanding how displacement maps work. The given arguments define the maximum amount of displacement in pixels that a particular map can produce. If the displacement scale is large enough it is also possible to lookup parts of the background image that lie well outside the bounds of the displacement map itself. That is you could very easily copy a section of the original image from outside the overlay area into the overlay area. The flag makes the displacement scale relative to the size of the overlay image (100 half widthheight of image). Using switches percentage arguments to refer to the destination image size instead. these flags were added as of IM v6.5.3-5. Normally a single grayscale displacement map is provided, which with the given scaling values will determine a single direction (vector) in which displacements can occur (positively or negatively). However, if you also specify a third image which is normally used as a mask. the composite image is used for horizontal X displacement, while the mask image is used for vertical Y displacement. This allows you to define completely different displacement values for the X and Y directions, and allowing you to lookup any point within the scale bounds. In other words each pixel can lookup any other nearby pixel, producing complex 2 dimensional displacements, rather than a simple 1 dimensional vector displacements. Alternatively rather than supplying two separate images, as of IM v6.4.4-0, you can use the red channel of the overlay image to specify the horizontal or X displacement, and the green channel for the vertical or Y displacement. As of IM v6.5.3-5 any alpha channel in the overlay image is used as a mask the transparency of the destination image. However areas outside the overlaid areas will not be effected. - display host:display. screen Specifies the X server to contact. This option is used with convert for obtaining image or font from this X server. See X(1) . - dispose method define the GIF disposal image setting for images that are being created or read in. The layer disposal method defines the way each the displayed image is to be modified after the current frame of an animation has finished being displayed (after its delay period), but before the next frame on an animation is to be overlaid onto the display. Here are the valid methods: Undefined 0: No disposal specified (equivalent to none ). None 1: Do not dispose, just overlay next frame image. Background 2: Clear the frame area with the background color. Previous 3: Clear to the image prior to this frames overlay. You can also use the numbers given above, which is what the GIF format uses internally to represent the above settings. To print a complete list of dispose methods, use - list dispose . Use dispose. turn off the setting and prevent resetting the layer disposal methods of images being read in. Use - set dispose method to set the image disposal method for images already in memory. - dissimilarity-threshold value maximum RMSE for subimage match (default 0.2). - dissolve srcpercent x dstpercent dissolve an image into another by the given percent. The opacity of the composite image is multiplied by the given percent, then it is composited over the main image. If srcpercent is greater than 100, start dissolving the main image so it becomes transparent at a value of 200 . If both percentages are given, each image are dissolved to the percentages given. Note that dissolve percentages do not add, two opaque images dissolved 50,50, produce a 75 transparency. For a 50 50 blending of the two images, you would need to use dissolve values of 50,100. - distort method arguments distort an image, using the given method and its required arguments . The arguments is a single string containing a list of floating point numbers separated by commas or spaces. The number of and meaning of the floating point values depends on the distortion method being used. Choose from these distortion types: Distort image by first scaling and rotating about a given center, before translating that center to the new location, in that order. It is an alternative method of specifying a Affine type of distortion, but without shearing effects. It also provides a good way of rotating and displacing a smaller image for tiling onto a larger background (IE 2-dimensional animations). The number of arguments determine the specific meaning of each argument for the scales, rotation, and translation operations. 2: Scale Angle 3: X, Y Angle 4: X, Y Scale Angle 5: X, Y ScaleX, ScaleY Angle 6: X, Y Scale Angle NewX, NewY 7: X, Y ScaleX, ScaleY Angle NewX, NewY This is actually an alternative way of specifying a 2 dimensional linear Affine or AffineProjection distortion. Distort the image linearly by moving a list of at least 3 or more sets of control points (as defined below). Ideally 3 sets or 12 floating point values are given allowing the image to be linearly scaled, rotated, sheared, and translated, according to those three points. See also the related AffineProjection and SRT distortions. More than 3 sets given control point pairs (12 numbers) is least squares fitted to best match a linear affine distortion. If only 2 control point pairs (8 numbers) are given a two point image translation rotation and scaling is performed, without any possible shearing, flipping or changes in aspect ratio to the resulting image. If only one control point pair is provides the image is only translated, (which may be a floating point non-integer translation). This distortion does not include any form of perspective distortion. Linearly distort an image using the given Affine Matrix of 6 pre-calculated coefficients forming a set of Affine Equations to map the source image to the destination image. See - affine setting for more detail, and meanings of these coefficients. The distortions Affine and SRT provide alternative methods of defining this distortion, with ImageMagick doing the calculations needed to generate the required coefficients. You can see the internally generated coefficients, by using a - verbose setting with those other variants. Bilinear Distortion, given a minimum of 4 sets of coordinate pairs, or 16 values (see below). Not that lines may not appear straight after distortion, though the distance between coordinates will remain consistent. The BilinearForward is used to map rectangles to any quadrilateral, while the BilinearReverse form maps any quadrilateral to a rectangle, while preserving the straight line edges in each case. Note that BilinearForward can generate invalid pixels which will be colored using the - alpha-color color setting. Also if the quadrilateral becomes flipped the image may disappear. There are future plans to produce a true Bilinear distortion that will attempt to map any quadrilateral to any other quadrilateral, while preserving edges (and edge distance ratios). Perspective distort the images, using a list of 4 or more sets of control points (as defined below). More that 4 sets (16 numbers) of control points provide least squares fitting for more accurate distortions (for the purposes of image registration and panorama effects). Less than 4 sets will fall back to a Affine linear distortion. Perspective Distorted images ensures that straight lines remain straight, but the scale of the distorted image will vary. The horizon is anti-aliased, and the sky color may be set using the - alpha-color setting. Do a Perspective distortion biased on a set of 8 pre-calculated coefficients. You can get these coefficients by looking at the - verbose output of a Perspective distortion, or by calculating them yourself. If the last two perspective scaling coefficients are zero, the remaining 6 represents a transposed Affine Matrix. Arc the image (variation of polar mapping) over the angle given around a circle. arcangle The angle over which to arc the image side-to-side rotateangle Angle to rotate resulting image from vertical center topradius Set top edge of source image at this radius bottomradius Set bottom edge to this radius (radial scaling) The resulting image is always resized to best fit the resulting image, (as if using distort ) while attempting to preserve scale and aspect ratio of the original image as much as possible with the arguments given by the user. All four arguments will be needed to change the overall aspect ratio of an Arced image. This a variation of a polar distortion designed to try to preserve the aspect ratio of the image rather than direct Cartesian to Polar conversion. Like Arc but do a complete Cartesian to Polar mapping of the image. that is the height of the input image is mapped to the radius limits, while the width is wrapped around between the angle limits. Arguments: Rmax, Rmin CenterX, CenterY, start, endangle All arguments are optional. With Rmin defaulting to zero, the center to the center of the image, and the angles going from -180 (top) to 180 (top). If Rmax is given the special value of 0, the the distance from the center to the nearest edge is used for the radius of the output image, which will ensure the whole image is visible (though scaled smaller). However a special value of -1 will use the distance from the center to the furthest corner, This may clip the corners from the input rectangular image, but will generate the exact reverse of a DePolar with the same arguments. If the plus form of distort (distort ) is used output image center will default to 0,0 of the virtual canvas, and the image size adjusted to ensure the whole input image is made visible in the output image on the virtual canvas. Uses the same arguments and meanings as a Polar distortion but generates the reverse Polar to Cartesian distortion. The special Rmax setting of 0 may however clip the corners of the input image. However using the special Rmax setting of -1 (maximum center to corner distance) will ensure the whole distorted image is preserved in the generated result, so that the same argument to Polar will reverse the distortion re-producing the original. Note that as this distortion requires the area resampling of a circular arc, which can not be handled by the builtin EWA resampling function. As such the normal EWA filters are turned off. It is recommended some form of super-sampling image processing technique be used to produce a high quality result. Given the four coefficients (A, B,C, D) as defined by Helmut Dersch. perform a barrel or pin-cushion distortion appropriate to correct radial lens distortions. That is in photographs, make straight lines straight again. So that it forms the function Rsrc r ( A r 3 B r 2 C r D ) Where X. Y is the optional center of the distortion (defaulting to the center of the image). The second form is typically used to distort images, rather than correct lens distortions. This is very similar to Barrel with the same set of arguments, and argument handling. However it uses the inverse of the radial polynomial, so that it forms the function Rsrc r ( A r 3 B r 2 C r D ) Note that this is not the reverse of the Barrel distortion, just a different barrel-like radial distortion method. Distort the given list control points (any number) using an Inverse Squared Distance Interpolation Method (Shepards Method ). The control points in effect do localized displacement of the image around the given control point (preserving the look and the rotation of the area near the control points. For best results extra control points should be added to lock the positions of the corners, edges and other unchanging parts of the image, to prevent their movement. The distortion has been likened to taffy pulling using nails, or pins stuck in a block of jelly which is then moved to the new position, distorting the surface of the jelly. Internally it is equivalent to generating a displacement map (see - displace ) for source image color look-up using the - sparse-color method of the same name. To print a complete list of distortion methods, use - list distort . Many of the above distortion methods such as Affine , Perspective , and Shepards use a list control points defining how these points in the given image should be distorted in the destination image. Each set of four floating point values represent a source image coordinate, followed immediately by the destination image coordinate. This produces a list of values such as. where U, V on the source image is mapped to X, Y on the destination image. For example, to warp an image using perspective distortion, needs a list of at least 4 sets of coordinates, or 16 numbers. Here is the perspective distortion of the built-in rose: image. Note how spaces were used to group the 4 sets of coordinate pairs, to make it easier to read and understand. If more that the required number of coordinate pairs are given for a distortion, the distortion method is least squares fitted to produce the best result for all the coordinate pairs given. If less than the ideal number of points are given, the distort will generally fall back to a simpler form of distortion that can handles the smaller number of coordinates (usually a linear Affine distortion). By using more coordinates you can make use of image registration tool to find matching coordinate pairs in overlapping images, so as to improve the fit of the distortion. Of course a bad coordinate pair can also make the fit worse. Caution is always advised. Colors are acquired from the source image according to a cylindrical resampling - filter. using a special technique known as EWA resampling. This produces very high quality results, especially when images become smaller (minified) in the output, which is very common when using perspective distortion. For example here we view a infinitely tiled plane all the way to the horizon. Note that a infinitely tiled perspective images involving the horizon can be very slow, because of the number of pixels that are compressed to generate each individual pixel close to the horizon. You can turn off EWA resampling, by specifying the special - filter setting of point (recommended if you plan to use super-sampling instead). If an image generates invalid pixels . such as the sky in the last example, - distort will use the current - alpha-color setting for these pixels. If you do not what these pixels to be visible, set the color to match the rest of the ground. The output image size will by default be the same as the input image. This means that if the part of the distorted image falls outside the viewed area of the distorted space, those parts is clipped and lost. However if you use the plus form of the operator (distort ) the operator will attempt (if possible) to show the whole of the distorted image, while retaining a correct virtual canvas offset, for image layering. This offset may need to be removed using repage. to remove if it is unwanted. Setting - verbose setting, will cause - distort to attempt to output the internal coefficients, and the - fx equivalent to the distortion, for expert study, and debugging purposes. This many not be available for all distorts. You can alternatively specify a special - define distort:viewport setting which will specify the size and the offset of the generated viewport image of the distorted image space. Setting a - define distort:scale scalefactor will scale the output image (viewport or otherwise) by that factor without changing the viewed contents of the distorted image. This can be used either for super-sampling the image for a higher quality result, or for panning and zooming around the image (with appropriate viewport changes, or post-distort cropping and resizing). Setting - define resample:verbose1 will output the cylindrical filter lookup table created by the EWA (Elliptical Weighted Average) resampling algorithm. Note this table uses a squared radius lookup value. This is typically only used for debugging EWA resampling. - distribute-cache port launch a distributed pixel cache server. - dither method Apply a Riemersma or Floyd-Steinberg error diffusion dither to images when general color reduction is applied via an option, or automagically when saving to specific formats. This enabled by default. Dithering places two or more colors in neighboring pixels so that to the eye a closer approximation of the images original color is reproduced. This reduces the number of colors needed to reproduce the image but at the cost of a lower level pattern of colors. Error diffusion dithers can use any set of colors (generated or user defined) to an image. Dithering is turned on by default, to turn it off use the plus form of the setting, dither. This will also also render PostScript without text or graphic aliasing. Disabling dithering often (but not always) leads to faster process, a smaller number of colors, but more cartoon like image coloring. Generally resulting in color banding effects in areas with color gradients. The color reduction operators - colors. - monochrome. - remap. and - posterize. apply dithering to images using the reduced color set they created. These operators are also used as part of automatic color reduction when saving images to formats with limited color support, such as GIF. XBM. and others, so dithering may also be used in these cases. Alternatively you can use - random-threshold to generate purely random dither. Or use - ordered-dither to apply threshold mapped dither patterns, using uniform color maps, rather than specific color maps. - draw string Annotate an image with one or more graphic primitives. Use this option to annotate or decorate an image with one or more graphic primitives. The primitives include shapes, text, transformations, and pixel operations. The shape primitives: point x, y line x0,y0 x1,y1 rectangle x0,y0 x1,y1 roundRectangle x0,y0 x1,y1 wc, hc arc x0,y0 x1,y1 a0,a1 ellipse x0,y0 rx, ry a0,a1 circle x0,y0 x1,y1 polyline x0,y0. xn, yn polygon x0,y0. xn, yn bezier x0,y0. xn, yn path specification image operator x0,y0 w, h filename The text primitive: text x0,y0 string The text gravity primitive: gravity NorthWest, North, NorthEast, West, Center, East, SouthWest, South, or SouthEast The text gravity primitive only affects the placement of text and does not interact with the other primitives. It is equivalent to using the - gravity command-line option, except that it is limited in scope to the - draw option in which it appears. The transformation primitives: rotate degrees translate dx, dy scale sx, sy skewX degrees skewY degrees The pixel operation primitives: color x0,y0 method matte x0,y0 method The shape primitives are drawn in the color specified by the preceding - fill setting. For unfilled shapes, use - fill none. You can optionally control the stroke (the outline of a shape) with the - stroke and - strokewidth settings. A point primitive is specified by a single point in the pixel plane, that is, by an ordered pair of integer coordinates, x. Y. (As it involves only a single pixel, a point primitive is not affected by - stroke or - strokewidth .) A line primitive requires a start point and end point. A rectangle primitive is specified by the pair of points at the upper left and lower right corners. A roundRectangle primitive takes the same corner points as a rectangle followed by the width and height of the rounded corners to be removed. The circle primitive makes a disk (filled) or circle (unfilled). Give the center and any point on the perimeter (boundary). The arc primitive is used to inscribe an elliptical segment in to a given rectangle. An arc requires the two corners used for rectangle (see above) followed by the start and end angles of the arc of the segment segment (e. g. 130,30 200,100 45,90). The start and end points produced are then joined with a line segment and the resulting segment of an ellipse is filled. Use ellipse to draw a partial (or whole) ellipse. Give the center point, the horizontal and vertical radii (the semi-axes of the ellipse) and start and end angles in degrees (e. g. 100,100 100,150 0,360). The polyline and polygon primitives require three or more points to define their perimeters. A polyline is simply a polygon in which the final point is not stroked to the start point. When unfilled, this is a polygonal line. If the - stroke setting is none (the default), then a polyline is identical to a polygon. A coordinate is a pair of integers separated by a space or optional comma. As an example, to define a circle centered at 100,100 that extends to 150,150 use: The Bezier primitive creates a spline curve and requires three or points to define its shape. The first and last points are the knots and these points are attained by the curve, while any intermediate coordinates are control points. If two control points are specified, the line between each end knot and its sequentially respective control point determines the tangent direction of the curve at that end. If one control point is specified, the lines from the end knots to the one control point determines the tangent directions of the curve at each end. If more than two control points are specified, then the additional control points act in combination to determine the intermediate shape of the curve. In order to draw complex curves, it is highly recommended either to use the path primitive or to draw multiple four-point bezier segments with the start and end knots of each successive segment repeated. For example: A path represents an outline of an object, defined in terms of moveto (set a new current point), lineto (draw a straight line), curveto (draw a Bezier curve), arc (elliptical or circular arc) and closepath (close the current shape by drawing a line to the last moveto) elements. Compound paths (i. e. a path with subpaths, each consisting of a single moveto followed by one or more line or curve operations) are possible to allow effects such as donut holes in objects. (See Paths .) Use image to composite an image with another image. Follow the image keyword with the composite operator, image location, image size, and filename: You can use 0,0 for the image size, which means to use the actual dimensions found in the image header. Otherwise, it is scaled to the given dimensions. See Alpha Compositing for a detailed discussion of alpha composition methods that are available. The special augmented compose operators such as dissolve that require arguments cannot be used at present with the - draw image option. Use text to annotate an image with text. Follow the text coordinates with a string. If the string has embedded spaces, enclose it in single or double quotes. For example, the following annotates the image with Works like magick for an image titled bird. miff. See the - annotate option for another convenient way to annotate an image with text. The rotate primitive rotates subsequent shape primitives and text primitives about the origin of the main image. If the - region option precedes the - draw option, the origin for transformations is the upper left corner of the region. The translate primitive translates subsequent shape and text primitives. The scale primitive scales them. The skewX and skewY primitives skew them with respect to the origin of the main image or the region. The transformations modify the current affine matrix, which is initialized from the initial affine matrix defined by the - affine option. Transformations are cumulative within the - draw option. The initial affine matrix is not affected that matrix is only changed by the appearance of another - affine option. If another - draw option appears, the current affine matrix is reinitialized from the initial affine matrix. Use the color primitive to change the color of a pixel to the fill color (see - fill ). Follow the pixel coordinate with a method: Consider the target pixel as that specified by your coordinate. The point method recolors the target pixel. The replace method recolors any pixel that matches the color of the target pixel. Floodfill recolors any pixel that matches the color of the target pixel and is a neighbor, whereas filltoborder recolors any neighbor pixel that is not the border color. Finally, reset recolors all pixels. Use matte to the change the pixel matte value to transparent. Follow the pixel coordinate with a method (see the color primitive for a description of methods). The point method changes the matte value of the target pixel. The replace method changes the matte value of any pixel that matches the color of the target pixel. Floodfill changes the matte value of any pixel that matches the color of the target pixel and is a neighbor, whereas filltoborder changes the matte value of any neighbor pixel that is not the border color (-bordercolor ). Finally reset changes the matte value of all pixels. You can set the primitive color, font, and font bounding box color with - fill. - font. and - box respectively. Options are processed in command line order so be sure to use these options before the - draw option. Strings that begin with a number must be quoted (e. g. use 1.png rather than 1.png). Drawing primitives conform to the Magick Vector Graphics format. - duplicate count, indexes duplicate an image one or more times. Specify the count and the image to duplicate by its index in the sequence. The first image is index 0. Negative indexes are relative to the end of the sequence, for example, -1 represents the last image of the sequence. Specify a range of images with a dash (e. g. 0-4). Separate indexes with a comma (e. g. 0,2). Use duplicate to duplicate the last image in the current image sequence. - edge radius detect edges within an image. Apply a digital filter to enhance a noisy image. perform histogram equalization on the image channel-by-channel. To perform histogram equalization on all channels in concert, transform the image into some other color space, such as HSL, OHTA, YIQ or YUV, then equalize the appropriate intensity-like channel, then convert back to RGB. For example using HSL, we have. - colorspace HSL - channel lightness - equalize - colorspace RGB. For YIQ, YUV and OHTA use the red channel. For example, OHTA is a principal components transformation that puts most of the information in the first channel. Here we have. - colorspace OHTA - channel red - equalize - colorspace RGB. - evaluate operator value Alter channel pixels by evaluating an arithmetic, relational, or logical expression. (See the - function operator for some multi-parameter functions. See the - fx operator if more elaborate calculations are needed.) The behaviors of each operator are summarized in the following list. For brevity, the numerical value of a pixel referred to below is the value of the corresponding channel of that pixel, while a normalized pixel is that number divided by the maximum (installation-dependent) value QuantumRange. (If normalized pixels are used, they are restored, following the other calculations, to the full range by multiplying by QuantumRange .) Summary (see further below for details) Threshold pixels to maximum values above value. The specified functions are applied only to each previously set - channel in the image. If necessary, the results of the calculations are truncated (clipped) to fit in the interval 0, QuantumRange . The transparency channel of the image is represented as a alpha values (0 fully transparent), so, for example, a Divide by 2 of the alpha channel will make the image semi-transparent. Append the percent symbol to specify a value as a percentage of the QuantumRange . To print a complete list of - evaluate operators, use - list evaluate . The results of the Add. Subtract and Multiply methods can also be achieved using either the - level or the level operator, with appropriate argument, to linearly modify the overall range of color values. Please note, however, that - level treats transparency as matte values (0 opaque), while - evaluate works with alpha values. AddModulus has been added as of ImageMagick 6.4.8-4 and provides addition modulo the QuantumRange. It is therefore equivalent to Add unless the resulting pixel value is outside the interval 0, QuantumRange . Exp or Exponential has been added as of ImageMagick 6.6.5-1 and works on normalized pixel values. The value used with Exp should be negative so as to produce a decaying exponential function. Non-negative values will always produce results larger unity and thus outside the interval 0, QuantumRange . The formula is expressed below. If the input image is squared, for example, using - function polynomial 2 0 0. then a decaying Gaussian function will be the result. Log has been added as of ImageMagick 6.4.2-1 and works on normalized pixel values. This a scaled log function. The value used with Log provides a scaling factor that adjusts the curvature in the graph of the log function. The formula applied to a normalized value u is below. log( value u 1) log( value 1) Pow has been added as of ImageMagick 6.4.1-9, and works on normalized pixel values. Note that Pow is related to the - gamma operator. For example, - gamma 2 is equivalent to - evaluate pow 0.5 . i. e. a square root function. The value used with - gamma is simply the reciprocal of the value used with Pow . Cosine and Sine was added as of IM v6.4.8-8 and converts the image values into a value according to a (co)sine wave function. The synonyms Cos and Sin may also be used. The output is biased 50 and normalized by 50 so as to fit in the respective color value range. The value scaling of the period of the function (its frequency), and thus determines the number of waves that will be generated over the input color range. For example, if the value is 1, the effective period is simply the QuantumRange but if the value is 2, then the effective period is the half the QuantumRange . 0.5 0.5 cos(2 u value ). See also the - function operator, which is a multi-value version of evaluate. - evaluate-sequence operator Alter channel pixels by evaluating an arithmetic, relational, or logical expression over a sequence of images. - extent geometry Set the image size and offset. If the image is enlarged, unfilled areas are set to the background color. To position the image, use offsets in the geometry specification or precede with a - gravity setting. To specify how to compose the image with the background, use - compose . This command reduces or expands a JPEG image to fit on an 800x600 display. If the aspect ratio of the input image isnt exactly 4:3, then the image is centered on an 800x600 black canvas: See Image Geometry for complete details about the geometry argument. - extract geometry Extract the specified area from image. This option is most useful for extracting a subregion of a very large raw image. Note that these two commands are equivalent: If you omit the offsets, as in the image is resized to the specified dimensions instead, equivalent to: See Image Geometry for complete details about the geometry argument. - family fontFamily Set a font family for text. This setting suggests a font family that ImageMagick should try to use for rendering text. If the family can be found it is used if not, a default font (e. g. Arial) or a family known to be similar is substituted (e. g. Courier might be used if System is requested but not found). - features distance display (co-occurrence matrix) texture measure features for each channel in the image in each of four directions (horizontal, vertical, left and right diagonals) for the specified distance. implements the forward discrete Fourier transform (DFT). This option is new as of ImageMagick 6.5.4-3 (and now working for Windows users in ImageMagick 6.6.0-9). It transforms an image from the normal (spatial) domain to the frequency domain. In the frequency domain, an image is represented as a superposition of complex sinusoidal waves of varying amplitudes. The image x and y coordinates are the possible frequencies along the x and y directions, respectively, and the pixel intensity values are complex numbers that correspond to the sinusoidal wave amplitudes. See for example, Fourier Transform. Discrete Fourier Transform and Fast Fourier Transform . A single image name is provided as output for this option. However, the output result will have two components. It is either a two-frame image or two separate images, depending upon whether the image format specified supports multi-frame images. The reason that we get a dual output result is because the frequency domain represents an image using complex numbers, which cannot be visualized directly. Therefore, the complex values are automagically separated into a two-component image representation. The first component is the magnitude of the complex number and the second is the phase of the complex number. See for example, Complex Numbers . The magnitude and phase component images must be specified using image formats that do not limit the color or compress the image. Thus, MIFF, TIF, PFM, EXR and PNG are the recommended image formats to use. All of these formats, except PNG support multi-frame images. So for example, generates a magnitude image as fftimage. miff0 and a phase image as fftimage. miff1. Similarly, generates a magnitude image as fftimage-0.png and a phase image as fftimage-1.png. If you prefer this representation, then you can force any of the other formats to produce two output images by including adjoin following - fft in the command line. The input image can be any size, but if not square and even-dimensioned, it is padded automagically to the larger of the width or height of the input image and to an even number of pixels. The padding will occur at the bottom andor right sides of the input image. The resulting output magnitude and phase images is square at this size. The kind of padding relies on the - virtual-pixel setting. Both output components will have dynamic ranges that fit within 0, QuantumRange , so that HDRI need not be enabled. Phase values nominally range from 0 to 2, but is scaled to span the full dynamic range. (The first few releases had non-HDRI scaled but HDRI not scaled). The magnitude image is not scaled and thus generally will contain very small values. As such, the image normally will appear totally black. In order to view any detail, the magnitude image typically is enhanced with a log function into what is usually called the spectrum. A log function is used to enhance the darker values more in comparison to the lighter values. This can be done, for example, as follows: where either - contrast-stretch 0 or - auto-level is used to scale the image to full dynamic range, first. The argument to the - evaluate log typically is specified between 100 and 10,000, depending upon the amount of detail that one wants to bring out in the spectrum. Larger values produce more visible detail. Too much detail, however, may hide the important features. The FFTW delegate library is required to use - fft . Use fft to produce two output images that are the real and imaginary components of the complex valued Fourier transform. However, as the real and imaginary components can contain negative values, this requires that IM be configured with HDRI enabled. In this case, you must use either MIFF, TIF, PFM or MPC formats for the real and imaginary component results, since they are formats that preserve both negative and fractional values without clipping them or truncating the fractional part. With either MIFF or TIF, one should add - define quantum:format32, to allow those image types to work properly in HDRI mode without clipping. The real and imaginary component images resulting from fft are also square, even dimensioned images due to the same padding that was discussed above for the magnitude and phase component images. See the discussion on HDRI implementations of ImageMagick on the page High Dynamic-Range Images. For more about HDRI go the ImageMagick Usage pages, Freds Fourier Processing With ImageMagick page or this Wikipedia entry. By default the FFT is normalized (and the IFT is not). Use - define fourier:normalizeforward to explicitly normalize the FFT and unnormalize the IFT. - fill color color to use when filling a graphic primitive. This option accepts a color name, a hex color, or a numerical RGB, RGBA, HSL, HSLA, CMYK, or CMYKA specification. See Color Names for a description of how to properly specify the color argument. Enclose the color specification in quotation marks to prevent the or the parentheses from being interpreted by your shell. See - draw for further details. To print a complete list of color names, use the - list color option. - filter type Use this type of filter when resizing or distorting an image. Use this option to affect the resizing operation of an image during operations such as - resize and - distort. For example you can use a simple resize filter such as: The Bessel and Sinc filter is also provided (as well as a faster SincFast equivalent form). However these filters are generally useless on their own as they are infinite filters that are being clipped to the filters support size. Their direct use is not recommended except via expert settings (see below). Instead these special filter functions are typically windowed by a windowing function that the - filter setting defines. That is using these functions will define a Windowed filter, appropriate to the operator involved. Windowed filters include: Also one special self-windowing filter is also provided Lagrange. which will automagically re-adjust its function depending on the current support or lobes expert settings (see below). If you do not select a filter with this option, the filter defaults to Mitchell for a colormapped image, an image with a matte channel, or if the image is enlarged. Otherwise the filter default to Lanczos . To print a complete list of resize filters, use the - list filter option. You can modify how the filter behaves as it scales your image through the use of these expert settings (see also - define and - set ):- - define filter:blur factor Scale the X axis of the filter (and its window). Use gt 1.0 for blurry or lt 1.0 for sharp. This should only be used with Gaussian and Gaussian-like filters simple filters, or you may not get the expected results. - define filter:support radius Set the filter support radius. Defines how large the filter should be and thus directly defines how slow the filtered resampling process is. All filters have a default preferred support size. Some filters like Lagrange and windowed filters adjust themselves depending on this value. With simple filters this value either does nothing (but slow the resampling), or will clip the filter function in a detrimental way. - define filter:lobes count Set the number of lobes to use for the SincBessel filter. This an alternative way of specifying the support range of the filter, that is designed to be more suited to windowed filters, especially when used for image distorts. - define filter:sigma value The sigma value used to define the Gaussian filter. Default sigma value is 0.5 . It only effects Gaussian but does not shrink (but may enlarge) the filters support. It can be used to generate very small blurs but without the filter missing pixels due to using a small support setting. A larger value of 0.707 (a value of 1sqrt(2)) is another common setting. - define filter:b b-splinefactor - define filter:c keysalphafactor Redefine the values used for cubic filters such as Cubic. Catrom. Mitchel. and Hermite. as well as the Parzen cubic windowing function. If only one of the values are defined, the other is set so as to generate a Cubic-Keys filter. The values meaning was defined by a research paper by Mitchell-Netravali. - define filter:kaiser-beta value The alpha value used to as part of the Kaiser Windowing function. Default value is 6.5. It only effects Kaiser windowing function, and does not effect any other attributes. Before ImageMagick v6.7.6-10, this option was known as filter:alpha, (an inheritance from the very old zoom program). It was changed to bring the function in line with more modern academic research usage, and better assign it be more definitive. - define filter:kaiser-alpha value This value when multiplied by PI is equivalent to kaiser-beta, and will override that setting. It only effects Kaiser windowing function, and does not effect any other attributes. - define filter:filter filterfunction Use this function directly as the weighting filter. This will allow you to directly use a windowing function such as Blackman. as a resampling filter, rather than as its normal usage as a windowing function. If defined, no windowing function also defined, the window function is set to Box ). Directly specifying Sinc or Jinc as a filter will also do this. - define filter:window filterfunction The IIR (infinite impulse response) filters Sinc and Jinc are windowed (brought down to zero over the defined support range) with the given filter. This allows you to specify a filter function to be used as a windowing function for these IIR filters. Many of the defined filters are actually windowing functions for these IIR filters. A typical choices is Box. (which effectively turns off the windowing function). - define filter:win-support radius Scale windowing function to this size instead. This causes the windowing (or self-windowing Lagrange filter) to act is if the support window is larger than what is actually supplied to the calling operator. The filter however is still clipped to the real support size given. If unset this will equal the normal filter support size. - define filter:verbose 1 This causes IM to print information on the final internal filter selection to standard output. This includes a commented header on the filter settings being used, and data allowing the filter weights to be easily graphed. Note however that some filters are internally defined in terms of other filters. The Lanczos filter for example is defined in terms of a SincFast windowed SincFast filter, while Mitchell is defined as a general Cubic family filter with specific B and C settings. For example, to get a 8 lobe jinc windowed sinc filter (Genseng filter): Or a raw un-windowed Sinc filter with 4 lobes: To extract the data for a raw windowing function, combine it with a Box filter. For example the Welch parabolic windowing function. Note that the use of expert options is provided for image processing experts who have studied and understand how resize filters work. Without this knowledge, and an understanding of the definition of the actual filters involved, using expert settings are more likely to be detrimental to your image resizing. This is a simple alias for the - layers method flatten. (Reduce contrast. Here, A(white-black)100 and Bblack100.) The Polynomial function gives great versatility, since polynomials can be used to fit any continuous curve to any degree of accuracy desired. The Sinusoid function can be used to vary the channel values sinusoidally by setting frequency, phase shift, amplitude, and a bias. These values are given as one to four parameters, as follows, where phase is in degrees. (The domain 0,1 of the function corresponds to 0 through freq 360 degrees.) The result is that if a pixels normalized channel value is originally u . its resulting normalized value is given by For example, the following generates a curve that starts and ends at 0.9 (when u 0 and 1, resp.), oscillating three times between .7.2.5 and .7.2.9. The default values of amp and bias are both .5. The default for phase is 0. The Sinusoid function generalizes Sin and Cos of the - evaluate operator by allowing varying amplitude, phase and bias. The correspondence is as follows. - evaluate Sin freq - function Sinusoid freq ,0 - evaluate Cos freq - function Sinusoid freq ,90 The ArcSin function generates the inverse curve of a Sinusoid, and can be used to generate cylindrical distortion and displacement maps. The curve can be adjusted relative to both the input values and output range of values. with all values given in terms of normalized color values (0.0 for black, 1.0 for white). Defaulting to values covering the full range from 0.0 to 1.0 for bout input ( width ), and output ( width ) values. 1.0,0.5,1.0,0.5 The ArcTan function generates a curve that smooth crosses from limit values at infinities, though a center using the given slope value. All these values can be adjusted via the arguments. Defaulting to 1.0,0.5,1.0,0.5 . - fuzz distance Colors within this distance are considered equal. A number of algorithms search for a target color. By default the color must be exact. Use this option to match colors that are close to the target color in RGB space. For example, if you want to automagically trim the edges of an image with - trim but the image was scanned and the target background color may differ by a small amount. This option can account for these differences. The distance can be in absolute intensity units or, by appending as a percentage of the maximum possible intensity (255, 65535, or 4294967295). Use fuzz to reset the fuzz value to 0. - fx expression apply a mathematical expression to an image or image channels. If the first character of expression is . the expression is read from a file titled by the remaining characters in the string. - gamma value level of gamma correction. The same color image displayed on two different workstations may look different due to differences in the display monitor. Use gamma correction to adjust for this color difference. Reasonable values extend from 0.8 to 2.3. Gamma less than 1.0 darkens the image and gamma greater than 1.0 lightens it. Large adjustments to image gamma may result in the loss of some image information if the pixel quantum size is only eight bits (quantum range 0 to 255). Gamma adjusts the images channel values pixel-by-pixel according to a power law, namely, pow(pixel,1gamma) or pixel(1gamma), where pixel is the normalized or 0 to 1 color value. For example, using a value of gamma2 is the same as taking the square root of the image. You can apply separate gamma values to the red, green, and blue channels of the image with a gamma value list delimited with commas (e. g. 1.7,2.3,1.2 ). Use gamma value to set the image gamma level without actually adjusting the image pixels. This option is useful if the image is of a known gamma but not set as an image attribute (e. g. PNG images). Write the file gamma which is the reciprocal of the display gamma e. g. if your image is sRGB and you want to write a PNG gAMA chunk, use Note that gamma adjustments are also available via the - level operator. - gaussian-blur radius - gaussian-blur radius x sigma Blur the image with a Gaussian operator. Convolve the image with a Gaussian or normal distribution using the given Sigma value. The formula is: The Sigma value is the important argument, and determines the actual amount of blurring that will take place. The Radius is only used to determine the size of the array which will hold the calculated Gaussian distribution. It should be an integer. If not given, or set to zero, IM will calculate the largest possible radius that will provide meaningful results for the Gaussian distribution. The larger the Radius the radius the slower the operation is. However too small a Radius. and sever aliasing effects may result. As a guideline, Radius should be at least twice the Sigma value, though three times will produce a more accurate result. This differs from the faster - blur operator in that a full 2-dimensional convolution is used to generate the weighted average of the neighboring pixels. The - virtual-pixel setting will determine how pixels which are outside the image proper are blurred into the final result. - geometry geometry Set the preferred size and location of the image. See Image Geometry for complete details about the geometry argument. - gravity type Sets the current gravity suggestion for various other settings and options. Choices include: NorthWest. North. NorthEast. West. Center. East. SouthWest. South. SouthEast. Use - list gravity to get a complete list of - gravity settings available in your ImageMagick installation. The direction you choose specifies where to position text or subimages. For example, a gravity of Center forces the text to be centered within the image. By default, the image gravity is undefined. See - draw for more details about graphic primitives. Only the text primitive of - draw is affected by the - gravity option. The - gravity option is also used in concert with the - geometry setting and other settings or options that take geometry as an argument, such as the - crop option. If a - gravity setting occurs before another option or setting having a geometry argument that specifies an offset, the offset is usually applied to the point within the image suggested by the - gravity argument. Thus, in the following command, for example, suppose the file image. png has dimensions 200x100. The offset specified by the argument to - region is (40,20). The argument to - gravity is Center. which suggests the midpoint of the image, at the point (100,50). The offset (40,20) is applied to that point, giving (10040,5020)(60,70), so the specified 10x10 region is located at that point. (In addition, the - gravity affects the region itself, which is centered at the pixel coordinate (60,70). (See Image Geometry for complete details about the geometry argument.) When used as an option to composite. - gravity gives the direction that the image gravitates within the composite. When used as an option to montage. - gravity gives the direction that an image gravitates within a tile. The default gravity is Center for this purpose. - grayscale method convert image to grayscale. This will use one of the - intensity methods to convert the given image into a linear-grayscale image. For example, to convert an image to (linear) Rec709Luminance grayscale, type: which is equivalent to: Similarly, to convert an image to (non-linear) Rec709Luma grayscale, type: which is equivalent to: Note that a colorspace intensity method will produce the same result regardless of the current colorpsace of the image. But a mathematical intensity method will depend on the current colorspace the image is cu rrently using. While this operation uses an - intensity method, it does not use or set the - intensity setting, so will not effect other operations that may use that setting. - green-primary x, y green chromaticity primary point. - hald-clut apply a Hald color lookup table to the image. A Hald color lookup table is a 3-dimensional color cube mapped to 2 dimensions. Create it with the HALD: prefix (e. g. HALD:8). You can apply any color transformation to the Hald image and then use this option to apply the transform to the image. This option provides a convenient method for you to use Gimp or Photoshop to make color corrections to the Hald CLUT image and subsequently apply them to multiple images using an ImageMagick script. Note that the representation is only of the normal RGB color space and that the whole color value triplet is used for the interpolated lookup of the represented Hald color cube image. Because of this the operation is not - channel setting effected, nor can it adjust or modify an images transparency or alphamatte channel. See also - clut which provides color value replacement of the individual color channels, usually involving a simpler grayscale image. E. g: grayscale to color replacement, or modification by a histogram mapping. print usage instructions. - highlight-color color when comparing images, emphasize pixel differences with this color. - hough-lines width x height identify straight lines in the image (e. g. - hough-lines 9x9195). Use the Hough line detector with any binary edge extracted image to locate and draw any straight lines that it finds. The process accumulates counts for every white pixel in the binary edge image for every possible orientation (for angles from 0 to 179 in 1 deg increments) and distance from the center of the image to the corners (in 1 px increments). It stores the counts in an accumulator matrix of angle vs distance. The size of the accumulator will be 180x(diagonal2). Next it searches the accumulator for peaks in counts and converts the locations of the peaks to slope and intercept in the normal x, y input image space. The algorithm uses slopeintercepts to find the endpoints clipped to the bounds of the image. The lines are drawn from the given endpoints. The counts are a measure of the length of the lines. The WxH arguments specify the filter size for locating the peaks in the Hough accumulator. The threshold excludes lines whose counts are less than the threshold value. Use - background to specify the color of the background onto which the lines will be drawn. The default is black. Use - fill to specify the color of the lines. The default is black. Use - stroke and - strokewidth to specify the thickness of the lines. The default is black and no strokewidth. A text file listing the endpoints and counts may be created by using the suffix. mvg, for the output image. Use - define hough-lines:accumulatortrue to return the accumulator image in addition to the lines image. - iconGeometry geometry specify the icon geometry. Offsets, if present in the geometry specification, are handled in the same manner as the - geometry option, using X11 style to handle negative offsets. See Image Geometry for complete details about the geometry argument. start in icon mode in X Windows, animate, display identify the format and characteristics of the image. This information is printed: image scene number image name image size the image class ( DirectClass or PseudoClass ) the total number of unique colors and the number of seconds to read and transform the image. Refer to MIFF for a description of the image class. If - colors is also specified, the total unique colors in the image and color reduction error values are printed. Refer to color reduction algorithm for a description of these values. If - verbose precedes this option, copious amounts of image properties are displayed including image statistics, profiles, image histogram, and others. implements the inverse discrete Fourier transform (DFT). This option is new as of ImageMagick 6.5.4-3 (and now working for Windows users in ImageMagick 6.6.0-9). It transforms a pair of magnitude and phase images from the frequency domain to a single image in the normal or spatial domain. See for example, Fourier Transform. Discrete Fourier Transform and Fast Fourier Transform . For example, depending upon the image format used to store the result of the - fft. one would use either The resulting image may need to be cropped due to padding introduced when the original image, prior to the - fft or fft. was not square or even dimensioned. Any padding is at the right andor bottom sides of the image. The FFTW delegate library is required to use - ift . Use ift (with HDRI enabled) to transform a pair of real and imaginary images from the frequency domain to a single image in the normal (spatial) domain. By default the IFT is not normalized (and the FFT is). Use - define fourier:normalizeinverse to explicitly normalize the IFT and unnormalize the FFT. - immutable make image immutable. - implode factor implode image pixels about the center. - insert index insert the last image into the image sequence. This option takes last image in the current image sequence and inserts it at the given index. If a negative index is used, the insert position is calculated before the last image is removed from the sequence. As such - insert -1 will result in no change to the image sequence. The insert option is equivalent to - insert -1. In other words, insert the last image, at the end of the current image sequence. Consequently this has no effect on the image sequence order. - intensity method method to generate intensity value from pixel. ImageMagick provides a number of methods used in situations where an operator needs to determine a single grayscale value for some purpose, from an image with red, green, and blue pixel components. Typically the linear Rec709Luminance formula is used, which is the same formula used when converting images to - colorspace gray. The following formulas are currently provided, and will first convert the pixel values to linear-RGB or non-linear sRGB colorspace before being applied to calculate the final greyscale value. Rec601Luma 0.298839R 0.586811G 0.114350B Rec601Luminance 0.298839R 0.586811G 0.114350B Rec709Luma 0.212656R 0.715158G 0.072186B Rec709Luminance 0.212656R 0.715158G 0.072186B Brightness max(R, G, B) Lightness (min(R, G, B) max(R, G, B)) 2.0 Note that the above R, G,B values is the images linear-RGB values, while R, G,B are sRGB non-linear values. These intensity methods are mathematical in nature and will use the current value in the images respective R, G,B channel regardless of what that is, or what colorspace the image is currently using. Average (R G B) 3.0 MS (R2 G2 B2) 3.0 RMS sqrt( (R2 G2 B2) 3.0 ) These methods are often used for other purposes, such as generating a grayscale difference image between two color images (using - compose Difference composition. For example The MS (Mean Squared) setting is good for minimizing color error comparisions. While. The method RMS (Root Mean Squared) for example is appropriate for calculating color vector distance, from a color difference image. This is equivalent to the color only component of the - fuzz factor color compare setting. See also - grayscale which applies one of the above grayscaling formula directly to an image without setting the - intensity setting. The - colorspace gray image conversion also uses the current intensity setting, but will always convert the image to the appropriate sRGB or linear-RGB colorspace before appling the above function. To print a complete list of possible pixel intensity setting methods, use - list intensity . Operators affected by the - intensity setting include: - intent type use this type of rendering intent when managing the image color. Use this option to affect the color management operation of an image (see - profile ). Choose from these intents: Absolute, Perceptual, Relative, Saturation . The default intent is Perceptual for the sRGB colorspace and undefined for the RGB and gray colorspaces. To print a complete list of rendering intents, use - list intent . - interlace type the type of interlacing scheme. This option is used to specify the type of interlacing scheme for raw image formats such as RGB or YUV . None means do not interlace (RGBRGBRGBRGBRGBRGB. ), Line uses scanline interlacing (RRR. GGG. BBB. RRR. GGG. BBB. ), and. Plane uses plane interlacing (RRRRRR. GGGGGG. BBBBBB. ). Partition is like plane except the different planes are saved to individual files (e. g. image. R, image. G, and image. B). Use Line or Plane to create an interlaced PNG or GIF or progressive JPEG image. To print a complete list of interlacing schemes, use - list interlace . - interpolate type Set the pixel color interpolation method to use when looking up a color based on a floating point or real value. When looking up the color of a pixel using a non-integer floating point value, you typically fall in between the pixel colors defined by the source image. This setting determines how the color is determined from the colors of the pixels surrounding that point. That is how to determine the color of a point that falls between two, or even four different colored pixels. integer The color of the top-left pixel (floor function) nearest-neighbor The nearest pixel to the lookup point (rounded function) average The average color of the surrounding four pixels bilinear A double linear interpolation of pixels (the default) mesh Divide area into two flat triangular interpolations bicubic Fitted bicubic-spines of surrounding 16 pixels spline Direct spline curves (colors are blurred) filter Use resize - filter settings To print a complete list of interpolation methods, use - list interpolate . See also - virtual-pixel. for control of the lookup for positions outside the boundaries of the image. - interline-spacing value the space between two text lines. - kuwahara radius - kuwahara radius x sigma edge preserving noise reduction filter. The radius is more important than the sigma. If sigma is left off, it will be computed automatically from the radius as sigma radius -0.5. The sigma provides a bit of additional smoothing control. - label name assign a label to an image. Use this option to assign a specific label to the image, as it is read in or created. You can use the - set operation to re-assign a the labels of images already read in. Image formats such as TIFF, PNG, MIFF, supports saving the label information with the image. When saving an image to a PostScript file, any label assigned to an image is used as a header string to print above the postscript image. You can include the image filename, type, width, height, or other image attribute by embedding special format character. See Format and Print Image Properties for details of the percent escape codes. assigns an image label of MIFF:bird. miff 512x480 to the bird. miff image and whose width is 512 and height is 480, as it is read in. If a label option was used instead, any existing label present in the image would be used. You can remove all labels from an image by assigning the empty string. A label is not drawn on the image, but is embedded in the image datastream via Label tag or similar mechanism. If you want the label to be visible on the image itself, use the - draw option, or during the final processing in the creation of an image montage. If the first character of string is . the image label is read from a file titled by the remaining characters in the string. Labels in a file are literal, no embedded formatting characters are recognized. - lat width - lat width x height offset perform local adaptive threshold. Adaptively threshold each pixel based on the value of pixels in a surrounding window. If the current pixel is lighter than this average plus the optional offset. then it is made white, otherwise it is made black. Small variations in pixel values such as found in scanned documents can be ignored if offset is positive. A negative offset will make it more sensitive to those small variations. This is commonly used to threshold images with an uneven background. It is based on the assumption that average color of the small window is the the local background color, from which to separate the foreground color. - layers method handle multiple images forming a set of image layers or animation frames. Perform various image operation methods to a ordered sequence of images which may represent either a set of overlaid image layers, a GIF disposal animation, or a fully-coalesced animation sequence. Display image using this type . Choose from these Standard Colormap types: The X server must support the Standard Colormap you choose, otherwise an error occurs. Use list as the type and display searches the list of colormap types in top-to-bottom order until one is located. See xstdcmap(1) for one way of creating Standard Colormaps. - map components Here are the valid components of a map: r red pixel component g green pixel component b blue pixel component a alpha pixel component (0 is transparent) o opacity pixel component (0 is opaque) i grayscale intensity pixel component c cyan pixel component m magenta pixel component y yellow pixel component k black pixel component p pad component (always 0) You can specify as many of these components as needed in any order (e. g. bgr). The components can repeat as well (e. g. rgbr). - mattecolor color Specify the color to be used with the - frame option. The color is specified using the format described under the - fill option. The default matte color is BDBDBD. this shade of gray . This is an IMv6 option, use - alpha-color with IMv7. return the maximum intensity of an image sequence. Select the maximum value from all the surrounding pixels. This is legacy option from the method of the same name. - median geometry apply a median filter to the image. Select the middle value from all the surrounding pixels. This is legacy option from the method of the same name. - mean-shift width x height image noise removal and color reductionsegmentation (e. g. - mean-shift 7x710). width x height is the window size and distance is the color distance measured in the range 0 to 1 or 0 to 100 The mean shift algorithm is iterative and thus slower the larger the window size. For each pixel, it gets all the pixels in the window centered at the pixel and excludes those that are outside the radiussqrt((width-1)(height-1)4) surrounding the pixel. From those pixels, it finds which of them are within the specified squared color distance from the current mean. It then computes a new x, y centroid from those coordinates and a new mean. This new x, y centroid is used as the center for a new window. This process is iterated until it converges and the final mean is then used to replace the original pixel value. It repeats this process for the next pixel, etc, until it processes all pixels in the image. Results are better when using other colorspaces rather than RGB. Recommend YIQ, YUV or YCbCr, which seem to give equivalent results. - metric type Output to STDERR a measure of the differences between images according to the type given metric. AE absolute error count, number of different pixels (-fuzz effected) FUZZ mean color distance MAE mean absolute error (normalized), average channel error distance MEPP mean error per pixel (normalized mean error, normalized peak error) MSE mean error squared, average of the channel error squared NCC normalized cross correlation PAE peak absolute (normalized peak absolute) PHASH perceptual hash for the sRGB and HCLp colorspaces. Specify an alternative colorspace with - define phash:colorspaces colorspace, colorspace. PSNR peak signal to noise ratio RMSE root mean squared (normalized root mean squared) Control the AE , or absolute count of pixels that are different, with the - fuzz factor (ignore pixels which only changed by a small amount). Use PAE to find the size of the - fuzz factor needed to make all pixels similar, while MAE determines the factor needed for about half the pixels to be similar. The MEPP metric returns three different metrics ( MAE , MAE normalized, and PAE normalized) from a single comparison run. To print a complete list of metrics, use the - list metric option. return the minimum intensity of an image sequence. Select the minimal value from all the surrounding pixels. This is legacy option from the method of the same name. an simple alias for the - layers method mosaic - motion-blur radius - motion-blur radius x sigma angle simulate motion blur. Blur with the given radius, standard deviation (sigma), and angle. The angle given is the angle toward which the image is blurred. That is the direction people would consider the object is coming from. Note that the blur is not uniform distribution, giving the motion a definite sense of direction of movement. The - virtual-pixel setting will determine how pixels which are outside the image proper are blurred into the final result. replace each pixel with its complementary color. The red, green, and blue intensities of an image are negated. White becomes black, yellow becomes blue, etc. Use negate to only negate the grayscale pixels of the image. - noise geometry noise type Add or reduce noise in an image. The principal function of noise peak elimination filter is to smooth the objects within an image without losing edge information and without creating undesired structures. The central idea of the algorithm is to replace a pixel with its next neighbor in value within a pixel window, if this pixel has been found to be noise. A pixel is defined as noise if and only if this pixel is a maximum or minimum within the pixel window. Use - noise radius to specify the width of the neighborhood when reducing noise. This is equivalent to using a - statistic NonPeak operation, which should be used in preference. Use noise followed by a noise type to add noise to an image. Choose from these noise types: The amount of noise added can be controlled by the - attenuate setting. If unset the value is equivalent to 1.0, or a maximum noise addition. Note that Random will replace the image with noise rather than add noise to the image. Use Uniform, if you wish to add random noise to the image. To print a complete list of noises, use the - list noise option. Also see the - evaluate noise functions that allows the use of a controlling value to specify the amount of noise that should be added to an image. - normalize Increase the contrast in an image by stretching the range of intensity values. The intensity values are stretched to cover the entire range of possible values. While doing so, black-out at most 2 of the pixels and white-out at most 1 of the pixels. Note that as of ImageMagick 6.4.7-0, - normalize is equivalent to - contrast-stretch 2x1. (Before this version, it was equivalent to - contrast-stretch 2x99 ). All the channels are normalized in concert by the same amount so as to preserve color integrity, when the default channel setting is in use. Specifying any other - channel setting will normalize the RGB channels independently. See - contrast-stretch for more details. Also see - auto-level for a perfect normalization that is better suited to mathematically generated images. This operator is under review for re-development. - opaque color change this color to the fill color within the image. The color argument is defined using the format described under the - fill option. The - fuzz setting can be used to match and replace colors similar to the one given. Use opaque to paint any pixel that does not match the target color. The - transparent operator is exactly the same as - opaque but replaces the matching color with transparency rather than the current - fill color setting. To ensure that it can do this it also ensures that the image has an alpha channel enabled, as per - alpha set , for the new transparent colors, and does not require you to modify the - channel to enable alpha channel handling. - ordered-dither thresholdmap dither the image using a pre-defined ordered dither threshold map specified, and a uniform color map with the given number of levels per color channel. You can choose from these standard threshold maps: The threshold generated a simple 50 threshold of the image. This could be used with level to do the equivalent of - posterize to reduce an image to basic primary colors. The checks pattern produces a 3 level checkerboard dither pattern. That is a grayscale will become a pattern of solid black, solid white, and mid-tone colors into a checkerboard pattern of black and white. You can define your own threshold map for ordered dithering and halftoning your images, in either personal or system thresholds. xml XML file. See Resources for more details of configuration files. To print a complete list of the thresholds that have been defined, use the - list threshold option. Note that at this time the same threshold dithering map is used for all color channels, no attempt is made to offset or rotate the map for different channels is made, to create an offset printing effect. Also as the maps are simple threshold levels, the halftone and circle maps will create incomplete circles along the edges of a colored area. Also all the effects are purely onoff boolean effects, without anti-aliasing to make the circles smooth looking. Large dots can be made to look better with a small amount of blurring after being created. - orient image orientation specify orientation of a digital camera image. Choose from these orientations: To print a complete list of orientations, use the - list orientation option. - page geometry - page media offset page Set the size and location of an image on the larger virtual canvas. See Image Geometry for complete details about the geometry argument. For convenience you can specify the page size using media (see below). Offsets can then be added as with other geometry arguments (e. g. - page Letter4343 ). Use media as shorthand to specify the dimensions ( width x height ) of the PostScript page in dots per inch or a TEXT page in pixels. The choices for a PostScript page are: 11x17 792 x 1224 Ledger 1224 x 792 Legal 612 x 1008 Letter 612 x 792 LetterSmall 612 x 792 ArchE 2592 x 3456 ArchD 1728 x 2592 ArchC 1296 x 1728 ArchB 864 x 1296 ArchA 648 x 864 A0 2380 x 3368 A1 1684 x 2380 A2 1190 x 1684 A3 842 x 1190 A4 595 x 842 A4Small 595 x 842 A5 421 x 595 A6 297 x 421 A7 210 x 297 A8 148 x 210 A9 105 x 148 A10 74 x 105 B0 2836 x 4008 B1 2004 x 2836 B2 1418 x 2004 B3 1002 x 1418 B4 709 x 1002 B5 501 x 709 C0 2600 x 3677 C1 1837 x 2600 C2 1298 x 1837 C3 918 x 1298 C4 649 x 918 C5 459 x 649 C6 323 x 459 Flsa 612 x 936 Flse 612 x 936 HalfLetter 396 x 612 This option is also used to place subimages when writing to a multi-image format that supports offsets, such as GIF89 and MNG. When used for this purpose the offsets are always measured from the top left corner of the canvas and are not affected by the - gravity option. To position a GIF or MNG image, use - page x y (e. g. - page 100200). When writing to a MNG file, a - page option appearing ahead of the first image in the sequence with nonzero width and height defines the width and height values that are written in the MHDR chunk. Otherwise, the MNG width and height are computed from the bounding box that contains all images in the sequence. When writing a GIF89 file, only the bounding box method is used to determine its dimensions. For a PostScript page, the image is sized as in - geometry but positioned relative to the lower left-hand corner of the page by x offset y offset. Use - page 612x792. for example, to center the image within the page. If the image size exceeds the PostScript page, it is reduced to fit the page. The default gravity for the - page option is NorthWest. i. e. positive x and y offset are measured rightward and downward from the top left corner of the page, unless the - gravity option is present with a value other than NorthWest . The default page dimensions for a TEXT image is 612x792. This option is used in concert with - density . Use page to remove the page settings for an image. - paint radius simulate an oil painting. Each pixel is replaced by the most frequent color in a circular neighborhood whose width is specified with radius . simulate a Polaroid picture. Use polaroid to rotate the image at a random angle between -15 and 15 degrees. - poly wt, exp. combines multiple images according to a weighted sum of polynomials one floating point weight (coefficient) and one floating point polynomial exponent (power) for each image expressed as comma separated pairs. The weights should typically be fractions between -1 and 1. But the sum of weights should be 1 or at least between 0 and 1 to avoid clamping in non-hdri mode at black and white. The exponents may be positive, negative or zero. A negative exponent is equivalent to 1 divided by the image raised to the corresponding positive exponent. A zero exponent always produces 1 scaled by quantumrange to white, i. e. wtwhite, no matter what the image. The format is: output wt1image1exp1 wt2image2exp2. Some simple uses are: A weighted sum of each image provided all weights add to unity and all exponents1. If the the weights are all equal to 1(number of images), then this is equivalent to - evaluate-sequence mean . The sum of squares of two or more images, provided the weights are equal (and sum to 1 to avoid clamping) and the exponents equal 2. Note that one may add a constant color to the expression simply by using xc:somecolor for one of the images and specifying the desired weight and exponent equal to 0. Similarly one may add white to the expression by simply using null: (or xc:white) for one of the images with the appropriate weight and exponent equal to 0. - posterize levels reduce the image to a limited number of color levels per channel. Very low values of levels. por exemplo. 2, 3, 4, have the most visible effect. - precision value set the maximum number of significant digits to be printed. - preview type image preview type. Use this option to affect the preview operation of an image (e. g. convert file. png - preview Gamma Preview:gamma. png ). Choose from these previews: To print a complete list of previews, use the - list preview option. The default preview is JPEG . - print string interpret string and print to console. - process command process the image with a custom image filter. The command arguments has the form module arg1 arg2 arg3. argN where module is the name of the module to invoke (e. g. Analyze) and arg1 arg2 arg3. argN are an arbitrary number of arguments to pass to the process module. - profile filename profile profilename Manage ICM, IPTC, or generic profiles in an image. Using - profile filename adds an ICM (ICC color management), IPTC (newswire information), or a generic profile to the image. Use profile profilename to remove the indicated profile. ImageMagick uses standard filename globbing, so wildcard expressions may be used to remove more than one profile. Here we remove all profiles from the image except for the XMP profile: profile xmp,. Use identify - verbose to find out which profiles are in the image file. Use - strip to remove all profiles (and comments). To extract a profile, the - profile option is not used. Instead, simply write the file to an image format such as APP1, 8BIM, ICM, or IPTC . For example, to extract the Exif data (which is stored in JPEG files in the APP1 profile), use. It is important to note that results may depend on whether or not the original image already has an included profile. Also, keep in mind that - profile is an operator (as opposed to a setting) and therefore a conversion is made each time it is encountered, in order, in the command-line. For instance, in the following example, if the original image is CMYK with profile, a CMYK-CMYK-RGB conversion results. Furthermore, since ICC profiles are not necessarily symmetric, extra conversion steps can yield unwanted results. CMYK profiles are often very asymmetric since they involve 3gt4 and 4gt3 channel mapping. - quality value JPEGMIFFPNG compression level. For the JPEG and MPEG image formats, quality is 1 (lowest image quality and highest compression) to 100 (best quality but least effective compression). The default is to use the estimated quality of your input image if it can be determined, otherwise 92. When the quality is greater than 90, then the chroma channels are not downsampled. Use the - sampling-factor option to specify the factors for chroma downsampling. For the JPEG-2000 image format, quality is mapped using a non-linear equation to the compression ratio required by the Jasper library. This non-linear equation is intended to loosely approximate the quality provided by the JPEG v1 format. The default quality value 100, a request for non-lossy compression. A quality of 75 results in a request for 16:1 compression. For the MNG and PNG image formats, the quality value sets the zlib compression level (quality 10) and filter-type (quality 10). The default PNG quality is 75, which means compression level 7 with adaptive PNG filtering, unless the image has a color map, in which case it means compression level 7 with no PNG filtering. For compression level 0 (quality value less than 10), the Huffman-only strategy is used, which is fastest but not necessarily the worst compression. If filter-type is 4 or less, the specified PNG filter-type is used for all scanlines: 0 none 1 sub 2 up 3 average 4 Paeth If filter-type is 5, adaptive filtering is used when quality is greater than 50 and the image does not have a color map, otherwise no filtering is used. If filter-type is 6, adaptive filtering with minimum-sum-of-absolute-values is used. Only if the output is MNG, if filter-type is 7, the LOCO color transformation (intrapixel differencing) and adaptive filtering with minimum-sum-of-absolute-values are used. If the filter-type is 8 the zlib ZRLE compression strategy (or the ZHUFFMANONLY strategy, when compression level is 0) is used with adaptive PNG filtering. If the filter-type is 9 the zlib ZRLE compression strategy (or the ZHUFFMANONLY strategy, when compression level is 0) is used with no PNG filtering. The quality setting has no effect on the appearance or signature of PNG and MNG images, since the compression is always lossless. Not all combinations of compression level, strategy, and PNG filter type can be obtained using the - quality option. For more precise control, you can use the PNG:compression-levelN, PNG:compression-strategyN, and PNG:compression-filterN defines, respectively, instead. See - define. Values from the defines take precedence over values from the - quality option. For further information, see the PNG specification. For the MIFF and TIFF image formats, quality10 is the ZipBZip compression level, which is 0 (worst but fastest compression) to 9 (best but slowest). It has no effect on the image appearance, since the compression is always lossless. For the BPG image format, quality2 is the actual BPG compression level (range from 0 to 51). - quantize colorspace reduce colors using this colorspace. This setting defines the colorspace used to sort out and reduce the number of colors needed by an image (for later dithering) by operators such as - colors. Note that color reduction also happens automatically when saving images to color-limited image file formats, such as GIF, and PNG8. suppress all warning messages. Error messages are still reported. - radial-blur angle Blur around the center of the image. Note that this is actually a rotational blur rather than a radial and as such actually mis-named. The - virtual-pixel setting will determine how pixels which are outside the image proper are blurred into the final result. - raise thickness Lighten or darken image edges. This will create a 3-D effect. Use - raise to create a raised effect, otherwise use raise. Unlike the similar - frame option, - raise does not alter the dimensions of the image. - random-threshold low x high Apply a random threshold to the image. - read-mask filename Prevent updates to image pixels specified by the mask. This the same as using a mask used for composite masking operations, with grayscale values causing blended updates of the image the mask is attached to. Use read-mask to remove the mask from images. Also see - clip-mask which work in the same way, but with strict boolean masking. - red-primary x, y Set the red chromaticity primary point. - regard-warnings Pay attention to warning messages. This option causes some warnings in some image formats to be treated as errors. - remap filename Reduce the number of colors in an image to the colors used by this image. If the - dither setting is enabled (the default) then the given colors are dithered over the image as necessary, otherwise the closest color (in RGB colorspace) is selected to replace that pixel in the image. As a side effect of applying a - remap of colors across all images in the current image sequence, all the images will have the same color table. That means that when saved to a file format such as GIF, it will use that color table as a single common or global color table, for all the images, without requiring extra local color tables. Use remap to reduce all images in the current image sequence to use a common color map over all the images. This equivalent to appending all the images together (without extra background colors) and color reducing those images using - colors with a 256 color limit, then - remap those colors over the original list of images. This ensures all the images follow a single color map. If the number of colors over all the images is less than 256, then remap should not perform any color reduction or dithering, as no color changes are needed. In that case, its only effect is to force the use of a global color table. This recommended after using either - colors or - ordered-dither to reduce the number of colors in an animated image sequence. Note, the remap image colormap has at most 8-bits of precision. Deeper color maps are automagically coalesced with other colors to meet this requirement. - region geometry Set a region in which subsequent operations apply. The x and y offsets are treated in the same manner as in - crop . See Image Geometry for complete details about the geometry argument. Use region to remove any previously set regions. perform a remote operation. The only command recognized is the name of an image file to load. If you have more than one display application running simultaneously, use the window option to specify which application to control. render vector operations. Use render to turn off rendering vector operations. This useful when saving the result to vector formats such as MVG or SVG. - repage geometry Adjust the canvas and offset information of the image. This option is like - page but acts as an image operator rather than a setting. You can separately set the canvas size or the offset of the image on that canvas by only providing those components. See Image Geometry for complete details about the geometry argument. If a. flag is given the offset given is added to the existing offset to move the image relative to its previous position. This useful for animation sequences. A given a canvas size of zero such as 0x0 forces it to recalculate the canvas size so the image (at its current offset) will appear completely on that canvas (unless it has a negative offset). Use repage to completely removereset the virtual canvas meta-data from the images. The - set page option can be used to directly assign virtual canvas meta-data. - resample horizontal x vertical Resample image to specified horizontal and vertical resolution. Resize the image so that its rendered size remains the same as the original at the specified target resolution. For example, if a 300 DPI image renders at 3 inches by 2 inches on a 300 DPI device, when the image has been resampled to 72 DPI, it will render at 3 inches by 2 inches on a 72 DPI device. Note that only a small number of image formats (e. g. JPEG, PNG, and TIFF) are capable of storing the image resolution. For formats which do not support an image resolution, the original resolution of the image must be specified via - density on the command line prior to specifying the resample resolution. Note that Photoshop stores and obtains image resolution from a proprietary embedded profile. If this profile exists in the image, then Photoshop will continue to treat the image using its former resolution, ignoring the image resolution specified in the standard file header. - resize geometry Resize an image. See Image Geometry for complete details about the geometry argument. Offsets, if present in the geometry string, are ignored, and the - gravity option has no effect. If the - filter option or - define filter:optionvalue precedes the - resize option, the image is resized with the specified filter. Many image processing algorithms assume your image is in a linear-light coding. If your image is gamma-corrected, you can remove the nonlinear gamma correction, apply the transform, then restore it like this: - respect-parentheses settings remain in effect until parenthesis boundary. roll an image vertically or horizontally by the amount given. A negative x offset rolls the image right-to-left. A negative y offset rolls the image bottom-to-top. - rotate degrees Apply Paeth image rotation (using shear operations) to the image. Use gt to rotate the image only if its width exceeds the height. lt rotates the image only if its width is less than the height. For example, if you specify - rotate -90gt and the image size is 480x640, the image is not rotated. However, if the image is 640x480, it is rotated by -90 degrees. If you use gt or lt. enclose it in quotation marks to prevent it from being misinterpreted as a file redirection. Empty triangles in the corners, left over from rotating the image, are filled with the background color. See also the - distort operator and specifically the ScaleRotateTranslate distort method. - sample geometry minify magnify the image with pixel subsampling and pixel replication, respectively. Change the image size simply by directly sampling the pixels original from the image. When magnifying, pixels are replicated in blocks. When minifying, pixels are sub-sampled (i. e. some rows and columns are skipped over). The results are thus equivalent to using - resize with a - filter setting of point (nearest neighbor), though - sample is a lot faster, as it avoids all the filter processing of the image. As such it completely ignores the current - filter setting. The key feature of the - sample is that no new colors will be added to the resulting image, though some colors may disappear. See Image Geometry for complete details about the geometry argument. Offsets, if present in the geometry string, are ignored, unlike - resize. The actual sampling point is the middle of the sub-region being sampled. As such a single pixel sampling of an image will take the middle pixel, (or top-left-middle if image has even dimensions). However the - define sample:offset can be set to modify this position some other location within each sub-region being sampled, as a percentage offset. By default this value is 50 for the midpoint, but could be set to 0 for top-left, 100 for bottom-right, or with separate X and Y offsets such as 0x50 for left-middle edge of sampling sub-region. - sampling-factor horizontal-factor x vertical-factor sampling factors used by JPEG or MPEG-2 encoder and YUV decoderencoder. This option specifies the sampling factors to be used by the JPEG encoder for chroma downsampling. If this option is omitted, the JPEG library will use its own default values. When reading or writing the YUV format and when writing the M2V (MPEG-2) format, use - sampling-factor 2x1 or - sampling-factor 4:2:2 to specify the 4:2:2 downsampling method. - scale geometry minify magnify the image with pixel block averaging and pixel replication, respectively. Change the image size simply by replacing pixels by averaging pixels together when minifying, or replacing pixels when magnifying. The results are thus equivalent to using - resize with a - filter setting of box. Though it is a lot faster, as it avoids all the filter processing of the image. As such it completely ignores the current - filter setting. If when shrinking (minifying) images the original image is some integer multiple of the new image size, the number of pixels averaged together to produce the new pixel color is the same across the whole image. This is a special case known as binning and is often used as a method of reducing noise in image such as those generated by digital cameras, especially in low light conditions. - scene value set scene number. This option sets the scene number of an image or the first image in an image sequence. specify the screen to capture. This option indicates that the GetImage request used to obtain the image should be done on the root window, rather than directly on the specified window. In this way, you can obtain pieces of other windows that overlap the specified window, and more importantly, you can capture menus or other popups that are independent windows but appear over the specified window. seed a new sequence of pseudo-random numbers - segment cluster-threshold x smoothing-threshold segment the colors of an image. Segment an image by analyzing the histograms of the color components and identifying units that are homogeneous with the fuzzy c-means technique. This is part of the ImageMagick color quantization routines. Specify cluster threshold as the number of pixels in each cluster that must exceed the cluster threshold to be considered valid. Smoothing threshold eliminates noise in the second derivative of the histogram. As the value is increased, you can expect a smoother second derivative. The default is 1.5. If the - verbose setting is defined, a detailed report of the color clusters is returned. - selective-blur radius - selective-blur radius x sigma Selectively blur pixels within a contrast threshold. Blurs those pixels that are less than or equal to the threshold in contrast. The threshold may be expressed as a fraction of QuantumRange or as a percentage. separate an image channel into a grayscale image. Specify the channel with - channel . - sepia-tone percent-threshold simulate a sepia-toned photo. Specify threshold as the percent threshold of the intensity (0 - 99.9). This option applies a special effect to the image, similar to the effect achieved in a photo darkroom by sepia toning. Threshold ranges from 0 to QuantumRange and is a measure of the extent of the sepia toning. A threshold of 80 is a good starting point for a reasonable tone. - set key value sets image attributes and properties for images in the current image sequence. This will assign (or modify) specific settings attached to all the images in the current image sequence. Using the set form of the option will either remove, or reset that setting to a default state, as appropriate. For example, it will modify specific well known image meta-data attributes such as those normally overridden by: the options - delay. - dispose. and - page. - colorspace generally assigned before the image is read in, by using a key of the same name. If the given key does not match a specific known attribute , such as shown above, the setting is stored as a a free form property string. Such settings are listed in - verbose information ( info: output format) as Properties. This includes string properties that are set by and assigned to images using the options - comment. - label. - caption. These options actually assign a global artifact which are automatically assigned (and any Format Percent Escapes expanded) to images as they are read in. For example: The set value can also make use of Format and Print Image Properties in the defined value. For example: Other well known properties that are available include: date:create and date:modify and signature . The - repage operator will also allow you to modify the page attribute of an image for images already in memory (also see - page ). However it is designed to provide a finer control of the sub-parts of this attribute. The - set page option will only provide a direct, unmodified assignment of page attribute. This option can also associate a colorspace or profile with your image. For example, Some properties must be defined in a specific way to be used. For example only properties prefixed with filename: can be used to modify the output filename of an image. For example If the setting value is prefixed with option: the setting will be saved as a global Artifact exactly as if it was set using the - define option. As such settings are global in scope, they can be used to pass attributes and properties of one specific image, in a way that allows you to use them in a completely different image, even if the original image has long since been modified or destroyed. For example: Note that Format Percent Escapes will only match a artifact if the given key does not match an existing attribute or property. You can set the attributes of the image registry by prefixing the value with registry. The - set profile option can also be used to inject previously-formatted ancillary chunks into the output PNG file, using the commandline option as shown below or by setting the profile via a programming interface: where x is a location flag and filename is a file containing the chunk name in the first 4 bytes, then a colon (:), followed by the chunk data. This encoder will compute the chunk length and CRC, so those must not be included in the file. x can be b (before PLTE), m (middle, i. e. between PLTE and IDAT), or e (end, i. e. after IDAT). If you want to write multiple chunks of the same type, then add a short unique string after the x to prevent subsequent profiles from overwriting the preceding ones, e. g., - shade azimuth x elevation shade the image using a distant light source. Specify azimuth and elevation as the position of the light source. Use shade to return the shading results as a grayscale image. - shadow percent-opacity x y Set a font style for text. This setting suggests a font style that ImageMagick should try to apply to the currently selected font family. Select fontStyle from the following. - subimage-search search for subimage. This option is required to have compare search for the best match location of a small image within a larger image. This search will produce two images (or two frames). The first is the difference image and the second will be the match score image. The match-score image is smaller containing a pixel for ever possible position of the top-left corner of the given sub-image. that is its size will be the size of the largerimage - subimage 1. The brightest location in this image is the location s the locate on the best match that is also reported. Note that this may or may not be a perfect match, and the actual brightness will reflect this. Other bright peaks can be used to locate other possible matching locations. Note that the search will try to compare the sub-image at every possible location in the larger image, as such it can be very slow. The smaller the sub-image the faster this search is. - swap index, index Swap the positions of two images in the image sequence. For example, - swap 0,2 swaps the first and the third images in the current image sequence. Use swap to switch the last two images in the sequence. - swirl degrees swirl image pixels about the center. Degrees defines the tightness of the swirl. - synchronize synchronize image to storage device. Set to true to ensure all image data is fully flushed and synchronized to disk. There is a performance penalty, but the benefits include ensuring a valid image file in the event of a system crash and early reporting if there is not enough disk space for the image pixel cache. Mark the image as modified. - text-font name font for writing fixed-width text. Specifies the name of the preferred font to use in fixed (typewriter style) formatted text. The default is 14 point Courier . You can tag a font to specify whether it is a PostScript, TrueType, or OPTION1 font. For example, Courier. ttf is a TrueType font and x:fixed is OPTION1. - texture filename name of texture to tile onto the image background. - threshold value Apply simultaneous blackwhite threshold to the image. Any pixel values (more specifically, those channels set using x2011channel ) that exceed the specified threshold are reassigned the maximum channel value, while all other values are assigned the minimum. The threshold value can be given as a percentage or as an absolute integer value corresponding to the desired channel value. When given as an integer, the minimum attainable value is 0 (corresponding to black when all channels are affected), but the maximum value (corresponding to white) is that of the quantum depth of the particular build of ImageMagick, and is therefore dependent on the installation. For that reason, a reasonable recommendation for most applications is to specify the threshold values as a percentage. The following would force pixels with red values above 50 to have 100 red values, while those at or below 50 red would be set to 0 in the red channel. The green, blue, and alpha channels (if present) would be unchanged. As (possibly) impractical but instructive examples, the following would generate an all-black and an all-white image with the same dimensions as the input image. Note that the values of the transparency channel is treated as matte values (0 is opaque) and not as alpha values (0 is transparent). - thumbnail geometry Create a thumbnail of the image. This is similar to - resize. except it is optimized for speed and any image profile, other than a color profile, is removed to reduce the thumbnail size. To strip the color profiles as well, add - strip just before of after this option. See Image Geometry for complete details about the geometry argument. - tile filename Set the tile image used for filling a subsequent graphic primitive. - tile geometry FlashPix viewing parameters. - vignette radius x y soften the edges of the image in vignette style. The vignette effect rolloff is controlled by radiusxsigma. For nominal rolloff, this would be set to 0xsigma. A value of 0x0 will produce a circleellipse with no rolloff. The arguments x and y control the size of the circle. Larger values decrease the radii and smaller values increase the radii. Values of 00 will generate a circleellipse the same size as the image. The default values for x and y are 10 of the corresponding image dimension. Thus, the radii will be decreased by 10, i. e. the diameters of the circleellipse will be 80 of the corresponding image dimension. - virtual-pixel method Specify contents of virtual pixels . This option defines what color source should be used if and when a color lookup completely misses the source image. The color(s) that appear to surround the source image. Generally this color is derived from the source image, but could also be set to a specify background color. Choose from these methods: background the area surrounding the image is the background color black the area surrounding the image is black checker-tile alternate squares with image and background color dither non-random 32x32 dithered pattern edge extend the edge pixel toward infinity gray the area surrounding the image is gray horizontal-tile horizontally tile the image, background color abovebelow horizontal-tile-edge horizontally tile the image and replicate the side edge pixels mirror mirror tile the image random choose a random pixel from the image tile tile the image (default) transparent the area surrounding the image is transparent blackness vertical-tile vertically tile the image, sides are background color vertical-tile-edge vertically tile the image and replicate the side edge pixels white the area surrounding the image is white The default value is edge. This most important for distortion operators such as - distort. - implode. and - fx. However it also effects operations that may access pixels just outside the image proper, such as - convolve. - blur. and - sharpen. To print a complete list of virtual pixel types, use the - list virtual-pixel option. - visual type Animate images using this X visual type., animate, display Choose from these visual classes: The X server must support the visual you choose, otherwise an error occurs. If a visual is not specified, the visual class that can display the most simultaneous colors on the default screen is chosen. - watermark brightness x saturation Watermark an image using the given percentages of brightness and saturation. Take a grayscale image (with alpha mask) and modify the destination images brightness according to watermark images grayscale value and the brightness percentage. The destinations color saturation attribute is just direct modified by the saturation percentage, which defaults to 100 percent (no color change). - wave amplitude - wave amplitude x wavelength Shear the columns of an image into a sine wave. - wavelet-denoise threshold - wavelet-denoise threshold x softness removes noise from the image using a wavelet transform. The threshold is the value below which everything is considered noise and ranges from 0.0 (none) to QuantumRange or use percent (e. g. 5). Softness attenuates the threshold and typically ranges from 0.0 (none) to 1.0. The higher the value the more noise that remains in the image. - weight fontWeight Set a font weight for text. This setting suggests a font weight that ImageMagick should try to apply to the currently selected font family. Use a positive integer for fontWeight or select from the following. Thin Same as fontWeight 100. ExtraLight Same as fontWeight 200. Light Same as fontWeight 300. Normal Same as fontWeight 400. Medium Same as fontWeight 500. DemiBold Same as fontWeight 600. Bold Same as fontWeight 700. ExtraBold Same as fontWeight 800. Heavy Same as fontWeight 900. To print a complete list of weight types, use - list weight . - white-point x, y chromaticity white point. - white-threshold value Force to white all pixels above the threshold while leaving all pixels at or below the threshold unchanged. The threshold value can be given as a percentage or as an absolute integer value within 0, QuantumRange corresponding to the desired x2011channel value. See x2011threshold for more details on thresholds and resulting values. - window id Make the image the background of a window., animate, display id can be a window id or name. Specify root to select Xs root window as the target window. By default the image is tiled onto the background of the target window. If backdrop or - resize are specified, the image is surrounded by the background color. Refer to X RESOURCES for details. The image will not display on the root window if the image has more unique colors than the target window colormap allows. Use - colors to reduce the number of colors. - window-group specify the window group. - write filename write an image sequence. The image sequence preceding the - write filename option is written out, and processing continues with the same image in its current state if there are additional options. To restore the image to its original state after writing it, use the write filename option. Use - compress to specify the type of image compression. - write-mask filename Prevent updates to image pixels specified by the mask. This the same as using a mask used for composite masking operations, with grayscale values causing blended updates of the image the mask is attached to. Use write-mask to remove the mask from images. Also see - clip-mask which work in the same way, but with strict boolean masking. 1999-2017 ImageMagick Studio LLC

No comments:

Post a Comment