|
图像转置操作:
镜像--对角、行、列翻转- * 方法一
- read_image(Image, 'fabrik')
- mirror_image(Image, ImageMirror, 'row')
- mirror_image(ImageMirror, ImageMirror1, 'column')
- mirror_image(ImageMirror1,ImageMirror2,'diagonal')
- mirror_image(ImageMirror2, ImageMirror3, 'column')
- mirror_image(ImageMirror3, ImageMirror4, 'row')
- * ImageMirror4就是图像Image转置后的结果
复制代码
矩阵形式操作:
- * 方法二
- read_image(Image, 'fabrik')
- get_image_size(Image, Width, Height)
- tuple_gen_sequence(0,Width*Height-1,1,Sequence)
- tuple_mod(Sequence,Width,CF)
- tuple_div(Sequence,Width,RF)
- * 转置
- get_grayval(Image,RF,CF,Grayval)
- create_matrix(Height,Width,Grayval,MatrixID)
- transpose_matrix(MatrixID, MatrixTransposedID)
- get_full_matrix(MatrixTransposedID, Values)
- * 新建一副存储转置图像ImageT
- gen_image_const(ImageT,'real',Width, Height)
- tuple_mod(Sequence,Height,CFT)
- tuple_div(Sequence,Height,RFT)
- set_grayval(ImageT,RFT,CFT,Values)
- * ImageT就是图像Image转置后的结果
复制代码
|
|