JPH0816927B2 - Image processing device - Google Patents

Image processing device

Info

Publication number
JPH0816927B2
JPH0816927B2 JP61258605A JP25860586A JPH0816927B2 JP H0816927 B2 JPH0816927 B2 JP H0816927B2 JP 61258605 A JP61258605 A JP 61258605A JP 25860586 A JP25860586 A JP 25860586A JP H0816927 B2 JPH0816927 B2 JP H0816927B2
Authority
JP
Japan
Prior art keywords
image
coordinate
processing
file
coordinates
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Lifetime
Application number
JP61258605A
Other languages
Japanese (ja)
Other versions
JPS63113771A (en
Inventor
裕行 木村
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Canon Inc
Original Assignee
Canon Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Canon Inc filed Critical Canon Inc
Priority to JP61258605A priority Critical patent/JPH0816927B2/en
Priority to US07/113,997 priority patent/US4956872A/en
Publication of JPS63113771A publication Critical patent/JPS63113771A/en
Publication of JPH0816927B2 publication Critical patent/JPH0816927B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Description

【発明の詳細な説明】 [産業上の利用分野] 本発明はオリジナル画像上のランダムな位置に所定の
形状をパターンを発生させて、もとの画像を変換する画
像処理装置に関する。
The present invention relates to an image processing apparatus for converting an original image by generating a pattern having a predetermined shape at a random position on an original image.

[従来の技術] デジタル画像処理に関しては、各分野に於て種々の機
器、種々の方法が開発されており、写真等の自然画像も
デジタル画像データとして入力することにより、例えば
濃度変換、階調変換、モザイク処理、切抜き合成等の処
理を行つて、クリエイテイブな画像を作り出すことが可
能になっている。この様な方法として、1つは画面全体
に画一的に濃度変換、階調変換、モザイク処理等の処理
を行うものであり、操作者は何の指示もいらない代り
に、画面全体が同一のパターンの繰返しとなり、メリハ
リがなく、面白味のない画像になつてしまう欠点があつ
た。
[Prior Art] With respect to digital image processing, various devices and various methods have been developed in various fields, and natural images such as photographs can be input as digital image data to perform density conversion, gradation It is possible to create creative images by performing processing such as conversion, mosaic processing, and cutout synthesis. As such a method, one is to uniformly perform density conversion, gradation conversion, mosaic processing, etc. on the entire screen, and the operator does not need any instruction, but the entire screen is the same. The pattern was repeated, resulting in an uninteresting image without sharpness.

また他の方法としては、デイジタイザ等の画像入力手
段や乱数発生手段を用いて画面内の箇所を指示し、この
部分だけに例えば濃度変換、色変換、切抜き合成等の処
理を行うものがある。これは画面内に処理を加えた部分
と処理を加えない部分が作られるので、画像にメリハリ
ができ、処理した上から再度処理することにより、種々
のパターンが作り出される為、きわめてクリエイテイブ
な画像が作り出せる。
As another method, there is a method in which an image input means such as a digitizer or a random number generation means is used to indicate a portion on the screen, and only this portion is subjected to processing such as density conversion, color conversion, and cutout synthesis. This creates a processed part and a non-processed part in the screen, so the image can be sharpened, and various patterns can be created by processing again after processing, resulting in an extremely creative image. Can be created.

[発明が解決しようとする問題点] しかし、これらの方法は乱数を発生させたり、操作者
の指示によつて実行されるため時間がよけいにかかつて
しまうという問題点があつた。さらに、乱数によりラン
ダムに指示する場合、離散的な位置に形状を作つていく
ため、1度描いた形状の上に別の形状が重ねて描かれる
場合が発生し、同じ画素に2度以上処理を加えることと
なり、余計な時間がかかつてしまうという欠点があつ
た。
[Problems to be Solved by the Invention] However, these methods have a problem in that time is overrun because they are generated by random numbers and are executed according to an instruction from an operator. Furthermore, when randomly designating with a random number, a shape is created at discrete positions, so another shape may be drawn on top of a shape drawn once, and the same pixel may be processed twice or more. However, there is a drawback that it takes extra time.

本発明は上記従来例に鑑みてなされたもので、ランダ
ムに指定された画素をほぼ中心とする所定パターン内の
複数画素の座標を、指定された画素の座標に変換して座
標ファイルを作成し、その座標ファイルを用いて、入力
した画像データの画素の色を座標ファイルによって指定
された画像データの対応する座標の画素の色に変換する
ことにより、高速に画像データの変換を行うことができ
る画像処理装置を提供することを目的とする。
The present invention has been made in view of the above-mentioned conventional example, and converts the coordinates of a plurality of pixels in a predetermined pattern centered at a pixel designated at random to the coordinates of a designated pixel to create a coordinate file. By using the coordinate file to convert the pixel color of the input image data into the pixel color of the corresponding coordinate of the image data specified by the coordinate file, the image data can be converted at high speed. An object is to provide an image processing device.

[問題点を解決するための手段] 上記目的を達成するために本発明の画像処理装置は以
下のような構成を備える。即ち、 画像データの画素をランダムに指定する指定手段と、 前記指定手段により指定された画素をほぼ中心とする
複数画素からなる所定パターンを発生する発生手段と、 前記所定パターン内の複数の画素の座標を前記指定さ
れた画素の座標に変換し、座標ファイルを形成する形成
手段と、 前記指定手段によるランダムな画素の指定、前記発生
手段による所定パターンの発生及び前記形成手段による
座標ファイルの形成を複数回繰り返し、座標ファイルを
完成させる制御手段と、 前記制御手段によって形成された座標ファイルを用い
て、入力した画像データの画素の色を前記座標ファイル
によって指定された前記画像データの対応する座標の画
素の色に変換する変換手段とを有する。
[Means for Solving Problems] In order to achieve the above object, the image processing apparatus of the present invention has the following configuration. That is, a designating unit that randomly designates a pixel of image data, a generating unit that generates a predetermined pattern composed of a plurality of pixels with the pixel designated by the designating unit at the center, and a plurality of pixels in the predetermined pattern. Forming means for converting coordinates into coordinates of the designated pixels to form a coordinate file; random pixel designation by the designating means, generation of a predetermined pattern by the generating means, and formation of a coordinate file by the forming means. Repeating a plurality of times, using the control means for completing the coordinate file and the coordinate file formed by the control means, the color of the pixel of the input image data of the corresponding coordinates of the image data specified by the coordinate file And a conversion unit that converts the pixel color.

[作用] 以上の構成において、ランダムに指定された画素をほ
ぼ中心とする所定パターン内の複数画素の座標を、指定
された画素の座標に変換して座標ファイルを作成し、そ
の座標ファイルを用いて、入力した画像データの画素の
色を座標ファイルによって指定された画像データの対応
する座標の画素の色に変換するように動作する。
[Operation] In the above configuration, the coordinates of a plurality of pixels in a predetermined pattern centered at a randomly designated pixel are converted into the coordinates of the designated pixel to create a coordinate file, and the coordinate file is used. Then, the color of the pixel of the input image data is converted into the color of the pixel of the corresponding coordinate of the image data designated by the coordinate file.

[実施例] 以下、添付図面を参照して本発明の実施例を詳細に説
明する。
Embodiments Embodiments of the present invention will be described in detail below with reference to the accompanying drawings.

[画像処理装置の構成の説明(第1図)] 第1図は本実施例の画像処理装置の構成図である。[Description of Configuration of Image Processing Apparatus (FIG. 1)] FIG. 1 is a configuration diagram of the image processing apparatus of the present embodiment.

図中、1はTVカメラやドラムスキヤナ等の画像入力部
で、写真フイルムやプリント画像等の原稿画像を光電的
に読取り、A/D変換を行つてデジタル信号に変換してCPU
2に入力する。2は装置全体の制御を行うCPUで、第2図
以降のフローチヤートで示す制御プログラムやデータを
格納するROM、ワークエリアとしてのRAM等を備えてい
る。3は画像メモリで、画像入力部1よりのオリジナル
画像データを格納する画像メモリ31と、後述する各種画
像処理を行つた処理画像データを格納する画像メモリ32
とを備えている。
In the figure, reference numeral 1 is an image input unit such as a TV camera or a drum scanner, which photoelectrically reads an original image such as a photographic film or a print image, performs A / D conversion and converts the digital signal into a CPU.
Enter 2 Reference numeral 2 denotes a CPU for controlling the entire apparatus, which is provided with a ROM for storing control programs and data shown in the flow chart of FIG. 2 and subsequent drawings, a RAM as a work area, and the like. An image memory 3 includes an image memory 31 for storing the original image data from the image input unit 1 and an image memory 32 for storing the processed image data which has been subjected to various image processes described later.
It has and.

4は後述する各種画像処理コマンドを入力する、例え
ばキーボードやデジタイザ等のコマンド入力部である。
キーボードの場合は各種処理に対応するコマンドキーを
押下することにより、デジタイザの場合はデジタイザ盤
面上のメニユー、あるいはCRT画面上に表示されたメニ
ユーをカーソル等によつて指示することによりコマンド
指示が行われる。5は各種画像処理コマンドに対応する
座標変換フアイルを格納するデータフアイルである。
Reference numeral 4 denotes a command input unit such as a keyboard or a digitizer for inputting various image processing commands described later.
In the case of a keyboard, by pressing the command key corresponding to various processing, in the case of a digitizer, the command can be given by pointing the menu on the digitizer board or the menu displayed on the CRT screen with a cursor. Be seen. Reference numeral 5 is a data file for storing coordinate conversion files corresponding to various image processing commands.

6は画像メモリ3の画像データあるいはコマンド入力
用のメニユー表示等を行うCRTである。CPU2はコマンド
入力部4よりの処理コマンドに対応して、座標変換フア
イルをデータフアイル5より読出し、画像メモリ31のオ
リジナル画像データに必要な処理を行つて画像メモリ32
に格納する。この様にして作成された画像データはプリ
ンタあるいはフイルムコーダ等の出力部7により印刷さ
れる。
Reference numeral 6 is a CRT for displaying image data in the image memory 3 or a menu display for command input. The CPU 2 reads the coordinate conversion file from the data file 5 in response to the processing command from the command input unit 4, performs the necessary processing on the original image data of the image memory 31, and executes the image memory 32.
To be stored. The image data thus created is printed by the output unit 7 such as a printer or a film coder.

[モザイク処理の説明(第2図〜第4図)] 第2図は画像にモザイク処理を施した1例を示す図で
ある。
[Explanation of Mosaic Processing (FIGS. 2 to 4)] FIG. 2 is a diagram showing an example of mosaic processing performed on an image.

20は横方向にx0個、縦方向にy0個の画素で構成され
た、不図示のオリジナル画像をモザイク22によつて等分
割にモザイク処理した画像で、左上端の座標が(1,
1)、右下端の座標が(x0,y0)で示されている。21は画
像20にランダムに配置されるモザイクで、その大きさは
横幅が(2m+1)、縦幅は(2n+1)である。但し、こ
こでm,nは正の数である。
Reference numeral 20 denotes an image, which is composed of x 0 pixels in the horizontal direction and y 0 pixels in the vertical direction, which is an image obtained by equally mosaic-processing an unillustrated original image by a mosaic 22, and the coordinates of the upper left corner are (1,
1), the coordinates of the lower right corner are indicated by (x 0 , y 0 ). Reference numeral 21 is a mosaic randomly arranged in the image 20, and its size is (2m + 1) in width and (2n + 1) in height. However, m and n are positive numbers here.

第3図はデータフアイル5に格納されるモザイク処理
用の座標変換フアイルを作成するフローチヤートであ
る。
FIG. 3 is a flow chart for creating a coordinate conversion file for mosaic processing, which is stored in the data file 5.

まずステツプS1で、オリジナル画像の各画素に対して
変換したX座標、Y座標を格納するための配列X(x0,y
0),Y(x0,y0)をCPU2のRAMに用意する。
First, in step S1, an array X (x 0 , y) for storing the X and Y coordinates converted for each pixel of the original image is stored.
Prepare 0 ), Y (x 0 , y 0 ) in RAM of CPU2.

次にステツプS2で、配列の各要素X(x,y),Y(x,y)
にオリジナル画像の座標値(x,y)に対応する座標値を
代入する。これにより配列要素X(x,y)=x,Y(x,y)
=yとなる。但し、1≦x≦x0,1≦y≦y0である。これ
は、乱数によつてモザイクを発生させても、最後まで座
標変換が一度も行われない画素が発生する可能性がある
ために、全ての要素の座標値を予め設定しておくもので
ある。
Next, in step S2, each element of the array X (x, y), Y (x, y)
Substitute the coordinate value corresponding to the coordinate value (x, y) of the original image into. As a result, array element X (x, y) = x, Y (x, y)
= Y. However, 1 ≦ x ≦ x 0 and 1 ≦ y ≦ y 0 . This is because even if a mosaic is generated using random numbers, there is a possibility that some pixels will not be subjected to coordinate conversion until the end, so the coordinate values of all elements are set in advance. .

次にステツプS3に進み、モザイク21の個数を計数する
カウンタJを“1"にする。ステツプS4では乱数を発生さ
せて、オリジナル画面の座標内におけるモザイク21の中
心座標(xr,yr)を発生する。但し、1≦xr≦x0,1≦yr
≦y0である。次にステツプS5で中心座標(xr,yr)を中
心とするモザイク領域の全ての要素の座標(X,Y)に、
中心座標(xr,yr)をセットする。このモザイク領域に
は、モザイク21のサイズを基に、xr−m+1〜xr+m−
1,yr−n+1〜yr+n−1の範囲の座標値を有する要素
が該当する。
Next, in step S3, the counter J for counting the number of mosaics 21 is set to "1". In step S4, a random number is generated to generate the center coordinates (x r , y r ) of the mosaic 21 within the coordinates of the original screen. However, 1 ≤ x r ≤ x 0 , 1 ≤ y r
≦ y 0 . Next, in step S5, the coordinates (X, Y) of all the elements in the mosaic area centered on the central coordinates (x r , y r ) are set to
Set the center coordinates (x r , y r ). In this mosaic area, x r −m + 1 to x r + m− based on the size of the mosaic 21.
1, y r -n + 1~y r + n-1 of the element having a coordinate value in the range corresponds.

次にステツプS6に進み、モザイク21の黒枠領域となる
要素のX座標、Y座標に“0"を代入する。この黒枠領域
はそれぞれ(xr−m,yr−n〜yr+n),(xr+m,yr−n
〜yr+n),(xr−m〜xr+m,yr−n),(xr−m〜xr
+m,yr+n)で示される4角形の直線領域である。な
お、この黒枠領域は、画像全体に締まりを与えるために
加えられているもので、この領域を示す値は必ずしも
“0"である必要はなく、画面の領域から外れた範囲の値
であれば何でも良く、X,Y座標の少なくとも一方だけ
を、画面の領域から外れた範囲の値に変更して黒枠領域
を示す様にしても良いことはもちろんである。
Next, in step S6, "0" is assigned to the X coordinate and Y coordinate of the element forming the black frame area of the mosaic 21. Each black frame region (x r -m, y r -n~y r + n), (x r + m, y r -n
~y r + n), (x r -m~x r + m, y r -n), (x r -m~x r
+ M, y r + n) is a rectangular linear region. It should be noted that this black frame area is added to give a tightness to the entire image, and the value indicating this area does not necessarily have to be "0", as long as it is a value outside the screen area. Of course, at least one of the X and Y coordinates may be changed to a value outside the screen area to indicate the black frame area.

ステツプS7ではモザイク21を計数するカウンタJを+
1し、ステツプS8ではモザイク21の個数であるN回分繰
り返したかを調べる。モザイク21の個数がN個にならな
ければステツプS4に戻り、前述の動作を繰り返し実行す
るが、モザイク21の個数がN個になるとステツプS9に進
み、各要素のX座標、Y座標の値をデータフアイル5に
格納して処理を終了する。
In step S7, the counter J that counts the mosaic 21 is +
Then, in step S8, it is checked whether N times, which is the number of mosaics 21, have been repeated. If the number of mosaics 21 does not reach N, the process returns to step S4 and the above-described operation is repeated. However, if the number of mosaics 21 reaches N, the process proceeds to step S9 to set the X coordinate and Y coordinate values of each element. The data is stored in the data file 5, and the process is ended.

第4図は本実施例のモザイク処理のフローチヤートで
ある。
FIG. 4 is a flow chart of the mosaic processing of this embodiment.

まずステツプS10で画像入力部1よりオリジナル画像
デジタルデータを入力し、ステツプS11でオリジナル画
像データを画像メモリ31に格納する。次にステツプS12
で画面全体に横2m+1、縦2n+1の大きさを有する黒枠
付きのモザイク処理を行い、これを画像メモリ32に格納
する。これは第2図に示した様にオリジナル画像をモザ
イク22でマス目状に分割し、各モザイク22の中を同一色
にし、そして各モザイク22間の境界部の画素を黒色に変
えるものである。この後、ステツプS14〜S22でランダム
のモザイク21を発生させる。
First, in step S10, original image digital data is input from the image input section 1, and in step S11 the original image data is stored in the image memory 31. Then step S12
Then, mosaic processing with a black frame having a size of 2m + 1 in width and 2n + 1 in length is performed on the entire screen and stored in the image memory 32. As shown in FIG. 2, the original image is divided into squares by the mosaic 22, each mosaic 22 has the same color, and the pixels at the boundary between the mosaics 22 are changed to black. . After this, a random mosaic 21 is generated in steps S14 to S22.

ステツプS13でX,Y方向の座標カウンタを共に“1"と
し、ステツプS14で、第3図のフローチヤートを基に作
成したデータフアイル5より座標変換値を読出す。ステ
ツプS15では配列X(x,y),Y(x,y)の少なくともいず
れかが“0"かどうか、即ちモザイクの境界領域かをみ
る。境界領域のときはステツプS16に進み、画像メモリ3
2の対応する座標に黒色を入れる。境界領域でない時は
ステツプS17に進み、データフアイル5中の座標変換値
が、もとの座標値に等しい、即ち、X(x,y)=xかつ
Y(x,y)=yかどうかをみる。もとの座標値に等し
い、即ち座標変換がなされていない時は何もせずにステ
ツプS19に進むが、それ以外のときはステツプS18に進
み、画像メモリ31の対応するオリジナル画像の座標(X,
Y)の色を画像メモリ32の座標(x,y)に入れる。
In step S13, the coordinate counters in the X and Y directions are both set to "1", and in step S14 the coordinate conversion value is read from the data file 5 created based on the flow chart of FIG. At step S15, it is checked whether at least one of the arrays X (x, y) and Y (x, y) is "0", that is, the boundary area of the mosaic. If it is the boundary area, the process proceeds to step S16 and the image memory 3
Put black in the corresponding coordinates of 2. If it is not the boundary area, the process proceeds to step S17, and it is determined whether the coordinate conversion value in the data file 5 is equal to the original coordinate value, that is, X (x, y) = x and Y (x, y) = y. View. If it is equal to the original coordinate value, that is, if the coordinate conversion has not been performed, the process proceeds to step S19 without doing anything, but otherwise, the process proceeds to step S18, where the coordinate of the corresponding original image in the image memory 31 (X,
The color of Y) is put into the coordinates (x, y) of the image memory 32.

ステツプS19,20でx方向の1ライン分の画素がチエツ
クされたかをみる。1ライン分の画素のチエツクが終了
すると、ステツプS21に進みy方向に1ライン進み、次
のラインのチエツクを行う。1画面分の処理が終了する
と、画像メモリ32に処理済の画像データが格納され、ス
テツプS24で画像メモリ32の画像データを出力部7に出
力して処理が完了する。
Check whether the pixels for one line in the x direction have been checked in steps S19 and S20. When the check of the pixels for one line is completed, the process proceeds to step S21 and advances by one line in the y direction to check the next line. When the processing for one screen is completed, the processed image data is stored in the image memory 32, and the image data in the image memory 32 is output to the output unit 7 in step S24, and the processing is completed.

この様に、あらかじめデータフアイル5に座標変換フ
アイルを用意しておけば、画素を順次に処理していくこ
とができる。その都度乱数を用いてランダムに座標値を
発生させ、その座標値に該当する画素の周辺を処理する
ステツプを繰返すのに比べて、処理の高速化を計ること
ができる。
As described above, if the coordinate conversion file is prepared in advance in the data file 5, the pixels can be sequentially processed. Random numbers are used to generate coordinate values each time, and the processing speed can be increased as compared with the case of repeating the step of processing the periphery of the pixel corresponding to the coordinate values.

[油絵風処理の説明(第5図〜第8図)] 第5図は他の実施例を示すオリジナル画像上のランダ
ムな位置に、筆のタツチを示すブロツク50を配置する例
を示す図である。
[Explanation of Oil Painting-like Processing (FIGS. 5 to 8)] FIG. 5 is a diagram showing an example in which a block 50 showing the touch of a brush is arranged at a random position on an original image showing another embodiment. is there.

51は横方向x0個、縦方向y0個の画素で構成されるオリ
ジナル画像で、画像の左上端の座標が(1,1)、右下端
の座標が(x0,y0)で示されている。50は第6図にその
形状を示す、横7画素、縦5画素で構成された筆のタツ
チを示すブロツクで、オリジナル画像のランダムな位置
にN個配置され、自然画像をあたかも油絵で描いた様に
処理するものである。
Reference numeral 51 is an original image composed of x 0 pixels in the horizontal direction and y 0 pixels in the vertical direction. The upper left corner of the image is (1,1) and the lower right corner is (x 0 , y 0 ). Has been done. Reference numeral 50 is a block showing the shape of the brush, which is shown in FIG. 6 and consists of horizontal 7 pixels and vertical 5 pixels. N pieces are arranged at random positions in the original image, and the natural image is drawn as if it were an oil painting. Like this.

第7図はデータフアイル5に格納する油絵風処理用の
座標変換フアイル作成処理のフローチヤートである。
FIG. 7 is a flow chart of a coordinate conversion file creating process for oil painting style processing stored in the data file 5.

第3図のフローチヤートと同様にして、ステツプS30
〜S32で配列X(x0,y0),Y(x0,y0)を用意し、配列の
全ての要素にオリジナル画像51の座標値(1〜x0,1〜
y0)をセットする。ステツプS33では乱数を発生させ
て、オリジナル画像51の座標内におけるブロツク50の中
心52の座標(xr,yr)を得る。ステツプS34ではブロツク
50に相当する画素の座標を全て(xr,yr)とする。即ちx
r−3≦x≦xr+3,yr−2≦y≦yr+2の範囲内にある
画素のうち、ブロツク50内に存在する画素のX,Y座標を
(xr,yr)とするものである。
Similar to the flow chart of Fig. 3, step S30
The array X (x 0 , y 0 ), Y (x 0 , y 0 ) is prepared in S32, and the coordinate values (1 to x 0 , 1
y 0 ) is set. In step S33, a random number is generated to obtain the coordinates (x r , y r ) of the center 52 of the block 50 within the coordinates of the original image 51. Block on Step S34
The coordinates of pixels corresponding to 50 are all (x r , y r ). Ie x
Among the pixels within the range of r −3 ≦ x ≦ x r + 3, y r −2 ≦ y ≦ y r +2, the X, Y coordinates of the pixel existing in the block 50 are defined as (x r , y r ). To do.

第3図のフローチヤートと大きく異なる点は、油絵風
の処理の場合は、黒枠で囲む部分(境界領域)が存在し
ないので、第3図のステツプS6に相当する処理が第7図
の処理では省略されている。
The major difference from the flow chart of FIG. 3 is that in the case of oil painting-like processing, there is no part (boundary area) surrounded by a black frame, so the processing corresponding to step S6 of FIG. Omitted.

N個のブロツク50が画像上に形成されるとステツプS3
7にみ、X座標、Y座標の値をそのままデータフアイル
5に収納するのではなく、X座標、Y座標とその画素の
座標値x,yとの差、X−x,Y−yの値を収納する。これ
は、X座標、Y座標の値をそのままデータフアイル5に
収納すると、X座標の値は1〜x0、Y座標の値は1〜y0
の値となり、各要素に対してx0,y0を満たすデータ領域
を用意しなければならず、非常に多くのメモリを要す
る。
When N blocks 50 are formed on the image, step S3
7, the values of the X coordinate and the Y coordinate are not stored in the data file 5 as they are, but the difference between the X coordinate, the Y coordinate and the coordinate value x, y of the pixel, the value of X−x, Y−y. To store. When the X and Y coordinate values are stored in the data file 5 as they are, the X coordinate value is 1 to x 0 and the Y coordinate value is 1 to y 0.
Therefore, a data area satisfying x 0 , y 0 must be prepared for each element, which requires a very large amount of memory.

しかし本実施例の如くデータ領域の座標値の差をとつ
て収納すれば、座標変換が行われても、その座標値はせ
いぜい筆のタツチの形状の大きさ以内となるため、X−
xが−3〜+3,Y−yが−2〜+2の範囲内に収まるこ
とになる。これによりデータ領域が小さくなり、メモリ
を大幅に節約できるという効果がある。
However, if the difference in the coordinate value of the data area is stored as in this embodiment, the coordinate value is at most within the size of the shape of the touch of the brush even if the coordinate conversion is performed.
x is within the range of -3 to +3 and Y-y is within the range of -2 to +2. This has the effect of reducing the data area and significantly saving memory.

第8図は他の実施例の座標変換フアイルを用いた油絵
風処理のフローチヤートで、第4図のフローチヤートと
基本的に同じであるが、第4図のと比較して大きく異な
る点は、座標変換フアイルの座標値は差分値として入つ
ている点、及び黒枠領域がない点、更に油絵風処理では
オリジナル画像の上に筆タツチを加えていくため、画像
メモリ32に前もつてオリジナル画像を処理して格納する
必要はない点にある。
FIG. 8 is a flow chart of oil-painting-like processing using a coordinate conversion file of another embodiment, which is basically the same as the flow chart of FIG. 4, but differs greatly from that of FIG. , The coordinate value of the coordinate conversion file is included as a difference value, and the point without the black frame area. Furthermore, in the oil painting process, since the brush touch is added on the original image, the original image is also stored in the image memory 32. There is no need to process and store.

ステツプS40〜S42は第4図のステツプS10〜S13に等し
いので説明を略し、ステツプS43より説明を行う。ステ
ツプS43ではデータフアイル5よりX,Y座標の差、ΔX,Δ
Yを読込み、ステツプS44で画像メモリ31のオリジナル
画像の座標(x+ΔX,y+ΔY)の色を画像メモリ32の
座標(x,y)に格納する。このようにして、1≦x≦x0,
1≦y≦y0の1画面分の全画素が画像メモリ32に構成さ
れるとステツプS50に進み、画像メモリ32の処理済画像
を出力部7に出力して処理を終了する。
The steps S40 to S42 are the same as the steps S10 to S13 in FIG. 4, so that the description thereof will be omitted and the step S43 will be described. In step S43, the difference between the X and Y coordinates from the data file 5 is ΔX, Δ
Y is read, and in step S44, the color of the coordinates (x + ΔX, y + ΔY) of the original image in the image memory 31 is stored in the coordinates (x, y) of the image memory 32. In this way, 1 ≦ x ≦ x 0 ,
When all the pixels for one screen of 1 ≦ y ≦ y 0 are configured in the image memory 32, the process proceeds to step S50, the processed image in the image memory 32 is output to the output unit 7, and the process is ended.

この様に、データフアイル5にX座標、Y座標の差分
値を収納しておけば、データフアイル5として必要なメ
モリの容量を大幅に節約できるという効果がある。な
お、この処理で、黒枠付きの処理を行いたい場合は、筆
のタツチの形状として必要な値から外れた値(第6図の
場合例えばY座標に−3を代入する)をデータフアイル
に収納しておき、処理時にその値に応じて黒色に変換す
る処理を行うとよい。
As described above, storing the difference value between the X coordinate and the Y coordinate in the data file 5 has the effect of significantly reducing the memory capacity required for the data file 5. In addition, in this process, if it is desired to perform a process with a black frame, a value deviating from the value required for the shape of the touch of the brush (in the case of FIG. 6, substitute -3 for the Y coordinate) is stored in the data file. It is advisable to perform a process of converting to black according to the value at the time of processing.

[処理画像領域よりも座標変換フアイルのデータ領域を
大きくした例の説明(第9図〜第11図)] 第9図は処理画像領域91とデータ領域92の関係を示す
図で、91は処理画像領域を示し、前述の実施例と同様に
横x0,縦y0個の画素で構成されていて、左上端の座標
(xs,ys)を基準として、データ領域92内の処理画像領
域91がはみ出ない範囲で移動可能となつている。データ
領域92は処理画像領域91より大きい領域1≦x≦xd,1≦
y≦yd(但しxd>x0,yd>y0)を有する座標変換フアイ
ルのデータ領域である。
[Explanation of an example in which the data area of the coordinate conversion file is larger than the processed image area (FIGS. 9 to 11)] FIG. 9 is a diagram showing the relationship between the processed image area 91 and the data area 92, and 91 is the processing An image area is shown, which is composed of pixels of horizontal x 0 and vertical y 0 like the above-mentioned embodiment, and the processed image in the data area 92 is based on the coordinates (x s , y s ) of the upper left corner. The area 91 is movable within a range that does not protrude. The data area 92 is larger than the processed image area 91. Area 1 ≦ x ≦ x d , 1 ≦
It is a data area of the coordinate conversion file having y ≦ y d (where x d > x 0 , y d > y 0 ).

第10図はデータファイル5にデータ領域92の範囲の座
標変換ファイルを作成する、更に他の実施例のフローチ
ヤートである。本フローチヤートは第7図のフローチヤ
ートと配列X,Yのデイメンジヨンが異なるのみで、全く
同一であるからその説明を省略する。
FIG. 10 is a flow chart of yet another embodiment for creating a coordinate conversion file in the range of the data area 92 in the data file 5. This flow chart is exactly the same as the flow chart of FIG. 7 except for the dimensions of the arrays X and Y, and the description thereof is omitted.

第11図は処理画像領域よりも大きいデータ領域を有す
る座標変換ファイルをデータファイル5に格納している
場合の、更に実施例の油絵風処理のフローチヤートであ
る。
FIG. 11 is a flow chart of oil painting style processing of the embodiment when a coordinate conversion file having a data area larger than the processed image area is stored in the data file 5.

ステツプS70,S71で画像入力部1よりオリジナル画像
が画像メモリ31に格納される。ステツプS72では乱数を
発生させて、座標変換ファイルのスタート座標(xs,
ys)を求める。但し、ここで1≦xs≦xd−x0,1≦ys≦yd
−y0の範囲にあることはもちろんである。ステツプS73
ではx,y方向のカウンタを共に“1"とし、ステツプS74で
データファイル中の座標変換ファイルより差分Δx(x
+xs−1,y+ys−1),ΔY(x+xs−1,y+ys−1)を
読み出す。従つてまず最初にオリジナル画像の座標
(xs,ys)に対応する差分データが読出され、ステツプS
75,S76でそれぞれx+ΔX,y+ΔYが処理画像領域91内
にあるかをみる。領域91内にない時はそれぞれステツプ
S76,S78で差分データを“0"にするが、領域91内にある
時はステツプS79に進む。
The original image is stored in the image memory 31 from the image input unit 1 in steps S70 and S71. In step S72, a random number is generated and the start coordinates (x s ,
y s ). However, here, 1 ≦ x s ≦ x d −x 0 , 1 ≦ y s ≦ y d
Of course, it is in the range of −y 0 . Step S73
Then, the counters in the x and y directions are both set to "1", and the difference Δx (x
+ X s −1, y + y s −1) and ΔY (x + x s −1, y + y s −1) are read. Therefore, first, the difference data corresponding to the coordinates (x s , y s ) of the original image are read out, and the step S
At 75 and S76, it is checked whether x + ΔX and y + ΔY are in the processed image area 91, respectively. When not in the area 91,
The difference data is set to "0" in S76 and S78, but if it is in the area 91, the process proceeds to step S79.

ステツプS79ではオリジナル画像の座標(x+ΔX,y+
ΔY)の色を、処理画像の座標(x,y)に格納する。こ
の様にして画像メモリ32に処理済画像を格納していき、
オリジナル画像の全ての画素に対して処理が完了する
と、ステツプS85で出力部7に出力して処理を終了す
る。
In step S79, the coordinates of the original image (x + ΔX, y +
The color ΔY) is stored in the coordinates (x, y) of the processed image. In this way, the processed image is stored in the image memory 32,
When the processing is completed for all the pixels of the original image, it is output to the output unit 7 in step S85 and the processing is ended.

この様にデータファイル5の座標変換ファイルを処理
画像領域よりも大きく作つておき、画像領域の位置をラ
ンダムに変えながら処理を行うことによつて、同一の座
標変換ファイルを用いて処理を行つても、その度に違う
結果が得られることになり、種々の結果のバリエーシヨ
ンを作り出すことができる。なお、この方法を用いて処
理を行う場合、x+ΔX,y+ΔYの値が処理画像領域を
出てしまう場合があるので、この場合はステツプS76と
ステツプS78とで、それぞれΔXとΔYを“0"にしてか
ら処理を行つている。
In this way, the coordinate conversion file of the data file 5 is made larger than the processing image area, and the processing is performed using the same coordinate conversion file by performing the processing while changing the position of the image area at random. However, different results will be obtained each time, and various variations of results can be created. When processing is performed using this method, the values of x + ΔX and y + ΔY may go out of the processing image area. In this case, ΔX and ΔY are set to “0” in step S76 and step S78, respectively. And then processing.

以上説明した如く本実施例によれば、座標変換ファイ
ルを予め作成して用意しておくことにより、毎回毎回乱
数を発生させて形状を配置していくのに比べ、高速に処
理できるという効果がある。
As described above, according to the present embodiment, by preparing and preparing the coordinate conversion file in advance, it is possible to process at a higher speed than generating a random number every time and arranging a shape. is there.

また他の実施例によれば、座標変換ファイル情報とし
て座標値の差分をメモリに格納することにより、メモリ
の容量を大幅に減少できるという効果がある。
According to another embodiment, the difference in coordinate value is stored in the memory as the coordinate conversion file information, so that there is an effect that the capacity of the memory can be significantly reduced.

また更に他の実施例によれば、座標変換ファイルのデ
ータ領域を処理画像領域より大きく作成しておき、デー
タ領域よりランダムに処理画像領域を選択することによ
り、同一の変換ファイルを用いても、異なる画像に変換
できるという効果がある。
According to still another embodiment, even if the same conversion file is used by creating a data area of the coordinate conversion file larger than the processing image area and selecting the processing image area at random from the data area, The effect is that it can be converted into a different image.

[発明の効果] 以上説明したように本発明によれば、ランダムに指定
された画素をほぼ中心とする所定パターン内の複数画素
の座標を、指定された画素の座標に変換して座標ファイ
ルを作成し、その座標ファイルを用いて、入力した画像
データの画素の色を座標ファイルによって指定された画
像データの対応する座標の画素の色に変換することによ
り、高速に画像データの変換を行うことができるという
効果がある。
[Effect of the Invention] As described above, according to the present invention, the coordinates of a plurality of pixels in a predetermined pattern centered at a randomly designated pixel are converted into the coordinates of a designated pixel to create a coordinate file. Create and use the coordinate file to convert the pixel color of the input image data to the pixel color of the corresponding coordinate of the image data specified by the coordinate file, so that the image data can be converted at high speed. There is an effect that can be.

【図面の簡単な説明】[Brief description of drawings]

第1図は本実施例の画像処理装置の構成図、 第2図はモザイク処理を示す概念図、 第3図はモザイク処理用の座標変換ファイル作成のフロ
ーチヤート、 第4図はモザイク処理のフローチヤート、 第5図は油絵風処理を示す概念図、 第6図は筆のタツチの形状を示す図、 第7図は油絵風処理用の座標変換ファイル作成のフロー
チヤート、 第8図は油絵風処理のフローチヤート、 第9図は座標変換ファイルを処理画像領域よりも大きく
した場合の概念図、 第10図は第9図の場合の座標変換ファイル作成のフロー
チヤート、 第11図は油絵風処理を第9図の場合で処理するフローチ
ヤートである。 図中、1……画像入力部、2……CPU、3……画像メモ
リ、4……コマンド入力部、5……データファイル、6
……CRT、7……出力部、51……オリジナル画像、21…
…ランダムモザイク、22……モザイク、31,32……画像
メモリ、50……ブロツク、52……中心画素、91……処理
画像領域、92……データ領域である。
FIG. 1 is a block diagram of the image processing apparatus of the present embodiment, FIG. 2 is a conceptual diagram showing mosaic processing, FIG. 3 is a flow chart for creating a coordinate conversion file for mosaic processing, and FIG. 4 is a mosaic processing flow. Chart, Fig. 5 is a conceptual diagram showing oil painting style processing, Fig. 6 is a diagram showing the shape of the touch of the brush, Fig. 7 is a flow chart for creating a coordinate conversion file for oil painting style processing, and Fig. 8 is an oil painting style. Flow chart of processing, Fig. 9 is a conceptual diagram when the coordinate conversion file is made larger than the processing image area, Fig. 10 is a flow chart of coordinate conversion file creation in the case of Fig. 9, and Fig. 11 is oil painting style processing. Is a flow chart for processing the above-mentioned case in FIG. In the figure, 1 ... Image input section, 2 ... CPU, 3 ... Image memory, 4 ... Command input section, 5 ... Data file, 6
…… CRT, 7 …… Output unit, 51 …… Original image, 21…
... Random mosaic, 22 ... Mosaic, 31,32 ... Image memory, 50 ... Block, 52 ... Central pixel, 91 ... Processed image area, 92 ... Data area.

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】画像データの画素をランダムに指定する指
定手段と、 前記指定手段により指定された画素をほぼ中心とする複
数画素からなる所定パターンを発生する発生手段と、 前記所定パターン内の複数の画素の座標を前記指定され
た画素の座標に変換し、座標ファイルを形成する形成手
段と、 前記指定手段によるランダムな画素の指定、前記発生手
段による所定パターンの発生及び前記形成手段による座
標ファイルの形成を複数回繰り返し、座標ファイルを完
成させる制御手段と、 前記制御手段によって形成された座標ファイルを用い
て、入力した画像データの画素の色を前記座標ファイル
によって指定された前記画像データの対応する座標の画
素の色に変換する変換手段と、 を有することを特徴とする画像処理装置。
1. A designating means for randomly designating pixels of image data, a generating means for generating a predetermined pattern composed of a plurality of pixels having a pixel designated by the designating means substantially at the center, and a plurality of means within the predetermined pattern. Forming means for converting the coordinates of the pixels of the above into the coordinates of the specified pixels to form a coordinate file; random pixel specification by the specifying means; generation of a predetermined pattern by the generating means; and coordinate file by the forming means. The control means for repeating the formation of a plurality of times to complete the coordinate file, and using the coordinate file formed by the control means, the color of the pixel of the input image data corresponds to the image data specified by the coordinate file. An image processing apparatus comprising: a conversion unit that converts the color of a pixel at a coordinate to
JP61258605A 1986-10-31 1986-10-31 Image processing device Expired - Lifetime JPH0816927B2 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP61258605A JPH0816927B2 (en) 1986-10-31 1986-10-31 Image processing device
US07/113,997 US4956872A (en) 1986-10-31 1987-10-29 Image processing apparatus capable of random mosaic and/or oil-painting-like processing

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP61258605A JPH0816927B2 (en) 1986-10-31 1986-10-31 Image processing device

Publications (2)

Publication Number Publication Date
JPS63113771A JPS63113771A (en) 1988-05-18
JPH0816927B2 true JPH0816927B2 (en) 1996-02-21

Family

ID=17322595

Family Applications (1)

Application Number Title Priority Date Filing Date
JP61258605A Expired - Lifetime JPH0816927B2 (en) 1986-10-31 1986-10-31 Image processing device

Country Status (1)

Country Link
JP (1) JPH0816927B2 (en)

Also Published As

Publication number Publication date
JPS63113771A (en) 1988-05-18

Similar Documents

Publication Publication Date Title
US4956872A (en) Image processing apparatus capable of random mosaic and/or oil-painting-like processing
US4602294A (en) Image reproducing method having a retouching function and an apparatus embodying the same
EP0179373B1 (en) Method of processing picture data for printing process
US5161035A (en) Digital image processing device for enlarging original image with high fidelity
US5412767A (en) Image processing system utilizing brush profile
GB2182524A (en) Picture image input/output system
EP0477904B1 (en) Method and apparatus for generating images of reduced size
US5418894A (en) Coloring of designated image area and pinhole elimination by image scaling
US5684942A (en) Image processing apparatus and method for generating a third image from first and second images
EP0612182A2 (en) Pixel and data format conversion processor for gravure
JPH0816929B2 (en) Image processing device
JPH0816927B2 (en) Image processing device
JPH0816928B2 (en) Image processing device
JPH0146905B2 (en)
JP3449563B2 (en) How to edit image data
JPH07200801A (en) Deformed image producing device
JP2818528B2 (en) Gravure plate making image data creation apparatus and creation method
JPH0620044A (en) Method and device for image processing
JP3889118B2 (en) Endless image reduction method and reduction apparatus
JP3075111B2 (en) Image cropping device and layout scanner
JPH06245071A (en) Method for correcting brightness and darkness of picture
JPH0946510A (en) Image forming device
JPS62112478A (en) Method for forming mesh image
JPH09181912A (en) Image processor and print system
JPH0661089B2 (en) Two-dimensional representation method of three-dimensional object

Legal Events

Date Code Title Description
EXPY Cancellation because of completion of term