English 中文(简体)
图像:将孔隙和景观的方面改变为平方形象(有混凝土)
原标题:Imagemagick: transform portrait and landscape aspects to square images (with blurred stripes)

将地貌图转换成一米,使用以下指挥器:

magick input.jpg -fuzz 15% -trim +repage ( -clone 0 -resize 100x`identify -format "%[fx:w/h*100]" $1`% -blur 0x10 ) +swap -gravity center -compose over -composite squared_landscape.jpg

The result looks fine: Processed landscape image However trying the same for portrait images with slightly changed parameters (swap of the h/w division to get the aspect ratio > 1) doesn t provide the same result:

magick input.jpg -fuzz 15% -trim +repage ( -clone 0 -resize `identify -format "%[fx:h/w*100]" $1`x100% -blur 0x10 ) +swap -gravity center -compose over -composite squared_portrait.jpg

执行标的比值(> 识别——格式“%[fx:h/w*100]”输入.jpg,其图像为2000x25px<126>。 然而,如上所述,执行指挥并不产生预期结果。

最终的想法是,将相同的通用线用于将孔隙和景观图像用于预期的平方结果。

问题回答

在《图像》中进行这一指挥。 地形或地形。 Unixynex。

照片:

“

magick monet2.jpg 
( -clone 0 -blur 0x10 ) 
( -clone 0 -gravity center -crop "%[fx:min(w,h)]x%[fx:min(w,h)]+0+0" +repage ) 
-delete 0 
-gravity center -compose over -composite monet2_blurcrop.jpg

enter image description here

地貌:

“在此处的影像描述”/

magick barn.jpg 
( -clone 0 -blur 0x10 ) 
( -clone 0 -gravity center -crop "%[fx:min(w,h)]x%[fx:min(w,h)]+0+0" +repage ) 
-delete 0 
-gravity center -compose over -composite barn_blurcrop.jpg

“entergraph

这里是另一个简单而有效的方法,将信道扩大到广场,填充具有相同形象的附加背景区。 这在Windows CLI syntax中使用图像Magick诉7。 注: 如果投入大于2:1或1:2,那么这一指挥将需要一些 t。

由此可见一幅oriented形图象......

magick monet.jpg -gravity center ^
   ( +clone -splice "%[fx:w<h?h-w:0]x%[fx:h<w?w-h:0]" -blur 0x12 ) ^
   +insert -composite result1.png

“enterography

以及具有地貌导向形象的确切指挥......

magick barn.jpg -gravity center ^
   ( +clone -splice "%[fx:w<h?h-w:0]x%[fx:h<w?w-h:0]" -blur 0x12 ) ^
   +insert -composite result2.png

“enterography

指挥把投入放在括号内,并在横向或纵向上为信道中心增加,使之正确。 另外,在母体内也增加了bl。

在括号之后,这种平方和模糊的形象被 back弃。 之后,它最后形成了以这一背景为核心的投入形象。

在Windows BAT的文字中使用,百分比表示为“%”。 为了使用“母子”器,从母体中提取“(......)”的斜体,将“^”的连续线护理改为“lash”。 我先对六分之一进行了测试,因此,可能还有其他特殊性质需要引述或分析。





相关问题
Resources for Image Recognition

I am looking for a recommendation for an introduction to image processing algorithms (face and shape recognition, etc.) and wondered if anyone had an good recommendations, either for books, ...

Good reference book for digital image processing? [closed]

I am learning digital image processing on my own and would like recomendations on good reference books. If you know of books to definately stay away from that would be useful as well. Thanks

Python Tesseract can t recognize this font

I have this image: I want to read it to a string using python, which I didn t think would be that hard. I came upon tesseract, and then a wrapper for python scripts using tesseract. So I started ...

What s the quickest way to parallelize code?

I have an image processing routine that I believe could be made very parallel very quickly. Each pixel needs to have roughly 2k operations done on it in a way that doesn t depend on the operations ...

Computing object statistics from the second central moments

I m currently working on writing a version of the MATLAB RegionProps function for GNU Octave. I have most of it implemented, but I m still struggling with the implementation of a few parts. I had ...

Viola-Jones face detection claims 180k features

I ve been implementing an adaptation of Viola-Jones face detection algorithm. The technique relies upon placing a subframe of 24x24 pixels within an image, and subsequently placing rectangular ...