# US 2008/0303812 A1 · Storage medium storing image processing program and image processing apparatus

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2008/0303812 A1
- Document ID: US20080303812A1
- Status: Published application
- Kind: A1
- Application number: 11/882,010
- Filed: 2007-07-30
- Published: 2008-12-11
- Earliest claimed: 2007-06-11
- Assignees: Nintendo Co., Ltd.
- Inventors: Takuhiro Dohta
- Web page: https://patentgrep.com/patent/US20080303812A1

## CPC

- G06T 15/00: Three-dimensional [3D] image rendering
- G06T 7/12: Edge-based segmentation
- G06T 15/02: Non-photorealistic rendering
- G06T 2207/20192: Edge enhancement; Edge preservation
- G06T: IMAGE DATA PROCESSING OR GENERATION, IN GENERAL

## Abstract

A game apparatus generates an image of a three-dimensional virtual space as viewed from a predetermined viewpoint, an object being provided in the three-dimensional virtual space. Next, the game apparatus obtains a depth value (Z value) indicating a depth from the viewpoint in a line-of-sight direction in the three-dimensional virtual space for each pixel of the image. Further, the game apparatus detects a pixel corresponding to a contour of the object based on the depth value. Specifically, a plurality of pixels are specified as reference pixels. It is determined whether or not a pixel of interest corresponds to a contour, based on a change level of differences in depth value between the pixel of interest and the reference pixels.

## Claims

### Claim 1

A computer readable storage medium storing an image processing program which causes a computer to execute a process of generating an image of a three-dimensional virtual space, the image processing program causing the computer to execute:
an image generating step of generating an image of a three-dimensional virtual space as viewed from a predetermined viewpoint, an object being provided in the three-dimensional virtual space;
a depth value obtaining step of obtaining a depth value indicating a depth from the viewpoint in a line-of-sight direction in the three-dimensional virtual space for each pixel of the image; and
a contour detecting step of detecting a pixel corresponding to a contour of the object based on the depth value.

### Claim 2 (depends on 1)

The storage medium according to claim 1, wherein
the image processing program causes the computer to further execute:
a pixel-of-interest selecting step of selecting a pixel of interest which is to be subjected to a process of determining whether or not the pixel corresponds to a contour, from all pixels of the image,
wherein the contour detecting step includes:
a reference pixel specifying step of specifying at least one reference pixel having a predetermined positional relationship with respect to the pixel of interest; and
a contour determining step of determining whether or not the pixel of interest corresponds to a contour, based on a difference in depth value between the pixel of interest and the reference pixel.

### Claim 3 (depends on 2)

The storage medium according to claim 2, wherein
in the reference pixel specifying step, the computer specifies a plurality of pixels as reference pixels, and
in the contour determining step, the computer determines whether or not the pixel of interest corresponds to a contour, based on a change level of differences in depth value between the pixel of interest and the plurality of reference pixels and optionally between the plurality of reference pixels themselves.

### Claim 4 (depends on 3)

The storage medium according to claim 3, wherein
in the reference pixel specifying step, the computer specifies as reference pixels at least two pixels positioned symmetric about the pixel of interest, and
in the contour determining step, the computer determines whether or not the pixel of interest corresponds to a contour, based on a change level of differences in depth value between the pixel of interest and the reference pixels.

### Claim 5 (depends on 3)

The storage medium according to claim 3, wherein
in the contour determining step, the computer uses as the change level a difference between an average of the depth values of the reference pixels and the depth value of the pixel of interest.

### Claim 6 (depends on 5)

The storage medium according to claim 5, wherein
in the contour determining step, when a difference obtained by subtracting the depth value of the pixel of interest from the average of the depth values of the reference pixels is larger than a predetermined value, the computer determines that the pixel of interest corresponds to a contour.

### Claim 7 (depends on 5)

The storage medium according to claim 5, wherein
in the contour determining step, when a difference obtained by subtracting the average of the depth values of the reference pixels from the depth value of the pixel of interest is larger than a predetermined value, the computer determines that the pixel of interest corresponds to a contour.

### Claim 8 (depends on 5)

The storage medium according to claim 5, wherein
in the contour determining step, when the absolute value of a difference between the average of the depth values of the reference pixels and the depth value of the pixel of interest is larger than a predetermined value, the computer determines that the pixel of interest corresponds to a contour.

### Claim 9 (depends on 3)

The storage medium according to claim 3, wherein
in the contour determining step, the computer uses as the change level a ratio of an average of the depth values of the reference pixels to the depth value of the pixel of interest.

### Claim 10 (depends on 3)

The storage medium according to claim 3, wherein
in the contour determining step, for a pixel corresponding to a contour, the computer calculates a contour value indicating a shade of the contour, depending on the change level, and
the image processing program causes the computer to further execute:
a contour image drawing step of drawing the contour with the shade corresponding to the contour value for a pixel which has been determined to correspond to the contour in the contour determining step.

### Claim 11 (depends on 4)

The storage medium according to claim 4, wherein
in the reference pixel specifying step, the computer specifies a plurality of sets of pixels, each set including two pixels positioned symmetric about the pixel of interest, so that directions from the pixel of interest to the pixels of each set are different from each other, and
in the contour determining step, the computer calculates the change level for each pixel set, and based on the calculated change levels, determines whether or not the pixel of interest corresponds to a contour.

### Claim 12 (depends on 11)

The storage medium according to claim 11, wherein
in the reference pixel specifying step, the computer specifies as reference pixels at least two pixels positioned symmetric about the pixel of interest and arranged in a lengthwise direction of the image and two pixels positioned symmetric about the pixel of interest and arranged in a widthwise direction of the image.

### Claim 13 (depends on 11)

The storage medium according to claim 11, wherein
in the reference pixel specifying step, the computer specifies as reference pixels at least two pixels positioned symmetric about the pixel of interest and arranged in a slanting direction of the image.

### Claim 14 (depends on 11)

The storage medium according to claim 11, wherein
the contour determining step includes:
a first determination step of calculating the change level for each pixel set, and based on the calculated change levels, preliminarily determining whether or not the pixel of interest corresponds to a contour for each pixel set; and
a second determining step of determining whether or not the pixel of interest corresponds to a contour, based on a result of the determination by the first determination step.

### Claim 15 (depends on 14)

The storage medium according to claim 14, wherein
in the first determination step, the computer uses conditions varying among the sets of reference pixels, as determination conditions for preliminarily determining whether or not the pixel of interest corresponds to a contour.

### Claim 16 (depends on 14)

The storage medium according to claim 14, wherein
in the reference pixel specifying step, the computer specifies reference pixels so that a distance from the pixel of interest to a reference pixel varies among the sets of reference pixels.

### Claim 17 (depends on 1)

The storage medium according to claim 1, wherein
the image processing program causes the computer to further execute:
a contour image drawing step of drawing the image generated in the image generating step, and performing a drawing process with respect to the pixel detected in the contour detecting step using a predetermined color.

### Claim 18 (depends on 1)

The storage medium according to claim 1, wherein
the image processing program causes the computer to further execute:
a contour image generating step of generating an image of only the contour detected in the contour detecting step.

### Claim 19 (depends on 1)

The storage medium according to claim 1, wherein
the image processing program causes the computer to further execute:
a process executing step of executing an antialiasing process with respect to a pixel in an area determined in accordance with the pixel detected by the contour detecting step.

### Claim 20 (depends on 1)

The storage medium according to claim 1, wherein
in the depth value obtaining step, the computer obtains a Z value stored in a Z buffer as the depth value.

### Claim 21 (depends on 1)

The storage medium according to claim 1, wherein
the depth value represents a position in a depth direction from the viewpoint to an object drawn in a pixel in the virtual space.

### Claim 22 (depends on 21)

The storage medium according to claim 21, wherein
in the depth value obtaining step, the computer obtains the depth value by converting a Z value stored in a Z buffer.

### Claim 23 (depends on 1)

The storage medium according to claim 1, wherein
in the depth value obtaining step, the computer obtains a value stored in a W buffer as the depth value.

### Claim 24

An image processing apparatus for generating an image of a three-dimensional virtual space, comprising:
an image generating means for generating an image of a three-dimensional virtual space as viewed from a predetermined viewpoint, an object being provided in the three-dimensional virtual space;
a depth value obtaining means for obtaining a depth value indicating a depth from the viewpoint in a line-of-sight direction in the three-dimensional virtual space for each pixel of the image; and
a contour detecting means for detecting a pixel corresponding to a contour of the object based on the depth value.

### Claim 25 (depends on 24)

The image processing apparatus according to claim 24, further comprising:
a pixel-of-interest selecting means for selecting a pixel of interest which is to be subjected to a process of determining whether or not the pixel corresponds to a contour, from the pixels of the image,
wherein the contour detecting means includes:
a reference pixel specifying means for specifying at least one reference pixel having a predetermined positional relationship with respect to the pixel of interest; and
a contour determining means for determining whether or not the pixel of interest corresponds to a contour, based on a difference in depth value between the pixel of interest and the reference pixel.

### Claim 26 (depends on 25)

The image processing apparatus according to claim 25, wherein
the reference pixel specifying means specifies a plurality of pixels as reference pixels, and
the contour determining means determines whether or not the pixel of interest corresponds to a contour, based on a change level of differences in depth value between the pixel of interest and the plurality of reference pixels and optionally between the plurality of reference pixels themselves.

### Claim 27 (depends on 26)

The image processing apparatus according to claim 26, wherein
the reference pixel specifying means specifies as reference pixels at least two pixels positioned symmetric about the pixel of interest, and
the contour determining means determines whether or not the pixel of interest corresponds to a contour, based on a change level of differences in depth value between the pixel of interest and the reference pixels.

### Claim 28 (depends on 26)

The image processing apparatus according to claim 26, wherein
the contour determining means uses as the change level a difference between an average of the depth values of the reference pixels and the depth value of the pixel of interest.

### Claim 29 (depends on 26)

The image processing apparatus according to claim 26, wherein
the contour determining means calculates, for a pixel corresponding to a contour, a contour value indicating a shade of the contour, depending on the change level, and
the image processing apparatus further includes:
a contour image drawing means for drawing the contour with the shade corresponding to the contour value for a pixel which has been determined by the contour determining means to correspond to the contour.

### Claim 30 (depends on 27)

The image processing apparatus according to claim 27, wherein
the reference pixel specifying means specifies a plurality of sets of pixels, each set including two pixels positioned symmetric about the pixel of interest, so that directions from the pixel of interest to the pixels of each set are different from each other, and
the contour determining means calculates the change level for each pixel set, and based on the calculated change levels, determines whether or not the pixel of interest corresponds to a contour.

### Claim 31 (depends on 30)

The image processing apparatus according to claim 30, wherein
the contour determining means includes:
a first determination means for calculating the change level for each pixel set, and based on the calculated change levels, preliminarily determining whether or not the pixel of interest corresponds to a contour for each pixel set; and
a second determining means for determining whether or not the pixel of interest corresponds to a contour, based on a result of the determination by the first determination means.

### Claim 32 (depends on 31)

The image processing apparatus according to claim 31, wherein
the first determination means uses conditions varying among the sets of reference pixels, as determination conditions for preliminarily determining whether or not the pixel of interest corresponds to a contour.

### Claim 33 (depends on 31)

The image processing apparatus according to claim 31, wherein
the reference pixel specifying means specifies reference pixels so that a distance from the pixel of interest to a reference pixel varies among the sets of reference pixels.

### Claim 34 (depends on 24)

The image processing apparatus according to claim 24, further comprising:
a contour image drawing means for drawing the image generated in the image generating step, and performing a drawing process with respect to the pixel detected by the contour detecting means using a predetermined color.
