WO2024005590A1 - Image scaling device and image scaling method - Google Patents

Image scaling device and image scaling method Download PDF

Info

Publication number
WO2024005590A1
WO2024005590A1 PCT/KR2023/009230 KR2023009230W WO2024005590A1 WO 2024005590 A1 WO2024005590 A1 WO 2024005590A1 KR 2023009230 W KR2023009230 W KR 2023009230W WO 2024005590 A1 WO2024005590 A1 WO 2024005590A1
Authority
WO
WIPO (PCT)
Prior art keywords
groups
value
transform
conversion
information
Prior art date
Application number
PCT/KR2023/009230
Other languages
French (fr)
Korean (ko)
Inventor
허훈
박연숙
Original Assignee
주식회사 네패스
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 주식회사 네패스 filed Critical 주식회사 네패스
Publication of WO2024005590A1 publication Critical patent/WO2024005590A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T1/00General purpose image data processing
    • G06T1/60Memory management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformation in the plane of the image
    • G06T3/40Scaling the whole image or part thereof
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/60Analysis of geometric attributes

Definitions

  • the present invention relates to an image scaling device and an image scaling method.
  • AI learning or inference accelerators that learn images as input data are being actively developed.
  • images may have different sizes, and the image resolution designed for each AI learning or inference accelerator is different, so it is necessary to convert the size of the input image to suit the design of the accelerator.
  • the purpose of the present invention is to provide an image scaling device and an image scaling method with a higher degree of freedom in conversion size.
  • the purpose of the present invention is to provide an image scaling device and an image scaling method that convert the size of an image to higher quality.
  • An image scaling device comprising: two or more memories; Receive an input image, information about the size of the input image, and information about the transformation size, and based on the size of the input image and the transformation size, a first transformation multiplier corresponding to the width and a second transformation multiplier corresponding to the height Identifying and dividing the plurality of pixels of the input image into a first plurality of groups based on any one of the first transformation multiplier and the second transformation multiplier, and sequentially providing information about the first plurality of groups. is stored in the two or more memories, and the first plurality of groups are grouped into a second plurality of groups based on the remaining one of the first conversion multiplier and the second conversion multiple. It includes a processor that generates a converted image by identifying the average value of pixels included in each group.
  • the processor includes a division design block and a fixed-point design block, and the division design block divides the size of the input image and the transformation size and divides the quotient and the remainder into the first transformation multiplier and the second transformation multiplier.
  • the conversion multiplier is identified as an integer value
  • the fixed-point design block can identify decimal values of the first conversion multiple and the second conversion multiple using the remainder and the conversion size.
  • the fixed-point design block (1) If the conversion size is less than twice the remainder, sets the most significant bit value of the decimal value to 1, and outputs a value obtained by subtracting the conversion size from two times the remainder. or, if the conversion size is not smaller than twice the remainder, the most significant bit value of the decimal value is set to 0, and a value obtained by doubling the remainder is output, and (2) the conversion size is equal to that of the previous step. If the output value is less than 2 times, the next bit value of the decimal value is set to 1, and a value obtained by subtracting the conversion size from 2 times the output value of the previous step is output, or the conversion size is equal to the output value of the previous step. If it is not less than twice, the next bit value of the decimal value is designated as 0, and a value twice the output value of the previous step is output. (3) When the decimal value has 8 binary bit values, You can repeat step (2) above until.
  • the processor groups the pixels included in each line in the width direction of the input image according to the first transform multiple, and groups the pixels included in each line in the width direction of the input image according to the first transform multiple.
  • the first plurality of groups can be generated by grouping pixels included in each line in the height direction of the input image according to the second transformation multiplier.
  • the processor is configured to perform a line in the width direction of the input image when the one transform multiple is the first transform multiple, and for each line in the height direction of the input image when the one transform multiple is the second transform multiple.
  • Information about the first plurality of groups may be separately stored in the two or more memories.
  • the information about the first plurality of groups may include information about the sum of the number of pixels included in each group and the pixel values of the pixels included in each group.
  • the processor may group the first plurality of groups into the second plurality of groups while sequentially reading information about the first plurality of groups from the two or more memories based on the remaining conversion multiple.
  • the processor stores information about the second plurality of groups, including information on the sum of the number of pixels included in each group among the second plurality of groups and pixel values of pixels included in each group, in the two or more memories. You can save it.
  • the processor sequentially reads information about the first plurality of groups as many lines as the number of lines corresponding to the integer value of the remaining conversion multiple, and groups the first plurality of groups into the second plurality of groups, The sum of the decimal values of the remaining conversion multiples is calculated as the number of the second plurality of groups, and each time the sum of the decimal values exceeds 1, one more number than the number of lines is read to form the first plurality of groups. It can be grouped into the second plurality group.
  • the processor identifies pixel values of a plurality of pixels of the input image, identifies a plurality of intermediate pixel values between each pixel and at least one neighboring pixel, and based on the first transformation multiplier, the pixel value and Store first up-scaling information including the intermediate pixel value corresponding to the number of pixels to be added in the two or more memories, and store first up-scaling information including the intermediate pixel value corresponding to the number of pixels to be added, and corresponding to the number of pixels to be added based on the first up-scaling information and the second transform multiplier.
  • the converted image may be generated by storing second up-scaling information including intermediate pixel values in the two or more memories, and sequentially reading the second up-scaling information stored in the two or more memories.
  • An image scaling method performed by an image scaling device comprising: receiving an input image, information about the size of the input image, and information about the transformation size; identifying a first transform multiplier corresponding to the width and a second transform multiplier corresponding to the height based on the size of the input image and the transform size; Dividing a plurality of pixels of the input image into a first plurality of groups based on one of the first transformation multiplier and the second transformation multiplier and sequentially storing information about the first plurality of groups ; After grouping the first plurality of groups into a second plurality of groups based on the remaining one of the first transformation multiplier and the second transformation multiplier, the average value of the pixels included in each of the second plurality of groups is calculated. It includes the step of identifying and generating a converted image.
  • the step of identifying the first transform multiplier and the second transform multiplier includes dividing the quotient obtained by dividing the size of the input image and the transform size and dividing the quotient among the remainder into integers of the first transform multiplier and the second transform multiplier. identifying by value; It may include identifying decimal values of the first transform multiple and the second transform multiple using the remainder and the transform size.
  • the step of identifying the decimal value of the first transform multiple and the second transform multiple includes (1) when the transform size is less than twice the remainder, specifying the highest bit value of the decimal value as 1, and Output a value obtained by subtracting the conversion size from 2 times the remainder, or, if the conversion size is not smaller than 2 times the remainder, specify the most significant bit value of the decimal value as 0, and output a value obtained by subtracting the conversion size from 2 times the remainder.
  • step 2 If the conversion size is less than twice the output value of the previous step, set the next bit value of the decimal value to 1, and output a value obtained by subtracting the conversion size from twice the output value of the previous step, Or, if the conversion size is not smaller than twice the output value of the previous step, designating the next bit value of the decimal value as 0 and outputting a value that is twice the output value of the previous step; (3) It may include repeating step (2) until the decimal value has 8 binary bit values.
  • the step of storing information about the first plurality of groups includes grouping pixels included in each line in the width direction of the input image according to the first transform multiplier when one of the transform multipliers is the first transform multiplier. (grouping), and when one of the transformation multipliers is the second transformation multiplier, the pixels included in each line in the height direction of the input image are grouped according to the second transformation multiplier to generate the first plurality of groups. May include steps.
  • the step of storing information about the first plurality of groups may include, if the one transform multiple is the first transform multiple, for each line in the width direction of the input image, the one transform multiple is the second transform multiple. If it is a multiple, the method may include storing information about the first plurality of groups for each line in the height direction of the input image.
  • the step of generating the conversion image includes sequentially reading information about the first plurality of groups stored based on the remaining conversion multiple and grouping the first plurality of groups into the second plurality of groups. It can be included.
  • the step of grouping the first plurality of groups into the second plurality of groups includes information on the sum of the number of pixels included in each group among the second plurality of groups and the pixel values of the pixels included in each group. It may include the step of storing information about the second plurality of groups.
  • the step of grouping the first plurality of groups includes sequentially reading information about the first plurality of groups as many lines as the number of lines corresponding to the integer value of the remaining conversion multiple, thereby dividing the first plurality of groups into the second plurality of groups. Grouping into a plurality of groups; calculating the sum of the decimal values of the remaining conversion multiples as many as the number of the second plurality of groups; The method may include grouping the first plurality of groups into the second plurality of groups by reading one more line than the number of lines whenever the sum of the decimal values exceeds 1.
  • identifying pixel values of a plurality of pixels of the input image identifying a plurality of intermediate pixel values between each pixel and at least one neighboring pixel; storing first up-scaling information including the pixel value and the intermediate pixel value corresponding to the number of pixels to be added based on the first conversion multiplier; storing second up-scaling information including an intermediate pixel value corresponding to the number of pixels to be added based on the first up-scaling information and the second transform multiplier; It may include generating the converted image by sequentially reading the stored second up-scaling information.
  • scaling can be performed faster and with fewer constraints on conversion multiples through a hardware configuration.
  • the conversion multiplier can be freely configured, so the usability of the conversion image, such as for AI learning, can be increased.
  • learning performance can be improved.
  • FIG. 1 is a diagram schematically showing an image scaling device according to an embodiment of the present invention.
  • Figure 2 is a block diagram showing the configuration of an image scaling device according to an embodiment of the present invention.
  • Figure 3 is a diagram illustrating an operation flowchart of an image scaling device according to an embodiment of the present invention.
  • FIG. 4 is a diagram illustrating an operation flowchart for identifying a conversion multiplier of an image scaling device according to an embodiment of the present invention.
  • Figure 5 is a diagram showing a downscaling operation of an image scaling device according to an embodiment of the present invention.
  • Figure 6 is a diagram showing the operation of an image scaling device according to an embodiment of the present invention.
  • Figure 7 is a diagram illustrating an upscaling operation of an image scaling device according to an embodiment of the present invention.
  • FIG. 8 is a diagram illustrating a lookup table for the number of pixels to be added according to the conversion multiplier during upscaling of the image scaling device according to an embodiment of the present invention.
  • Figure 9 is a diagram showing the operation of an image scaling device according to an embodiment of the present invention.
  • FIG. 1 is a diagram schematically showing an image scaling device according to an embodiment of the present invention.
  • the image scaling device 100 (hereinafter referred to as the scaling device 100) shown in FIG. 1 is a device that converts the size of the input image 10 into a converted image 30 according to size information 20. As such, it can be implemented with a computer, server, etc.
  • the input image 10 is not limited in format and may include dynamic images as well as static images.
  • size conversion may be applied on a frame-by-frame basis.
  • the size information 20 may include information about the size of the input image 10 and information about the size to be converted (hereinafter referred to as conversion size).
  • the scaling device 100 may perform upscaling to enlarge the image 10 and downscaling to reduce the image 10 by comparing the transformation size with the size of the input image 10.
  • Information about the size of the input image 10 may include the width and height of the input image, and information about the converted size may include the width and height of the converted image. However, information about the size of the input image 10 can be identified from the input image 10 received by the scaling device 100.
  • the converted image 30 is image data output by the scaling device 100.
  • the conversion multiple the multiple to be converted
  • the present invention proposes a scaling device 100 based on hardware design that has faster processing speed than software programming and has a high degree of freedom in conversion multiples.
  • Figure 2 is a block diagram showing the configuration of an image scaling device according to an embodiment of the present invention.
  • the scaling device 100 includes an input unit 110, a communication unit 120, a display unit 130, a memory 140, and a processor 150.
  • the input unit 110 generates input data in response to user input of the scaling device 100.
  • user input for performing image scaling such as user input regarding the conversion size, it can be applied without limitation.
  • the input unit 110 includes at least one input means.
  • the input unit 110 includes a keyboard, key pad, dome switch, touch panel, touch key, mouse, menu button, etc. may include.
  • the communication unit 120 receives the input image, information about the size of the input image, and information about the conversion size, and performs communication with external devices such as an AI learner and a server to transmit the converted image. To this end, the communication unit 120 may perform communications such as 5th generation communication (5G), long term evolution-advanced (LTE-A), long term evolution (LTE), and wireless fidelity (Wi-Fi).
  • 5G 5th generation communication
  • LTE-A long term evolution-advanced
  • LTE long term evolution
  • Wi-Fi wireless fidelity
  • the communication unit 120 includes a connector or port to which a cable capable of receiving the input image, information about the size of the input image, and information about the conversion size can be connected.
  • Connectors or ports may include USB ports, HDMI ports, DisplayPort, DVI ports, SCART, etc.
  • the communication unit 120 may include a connector or port according to a network transmission standard such as Ethernet.
  • the communication unit 120 may be implemented as a LAN card wired to a router or gateway.
  • the display unit 130 displays display data according to the operation of the scaling device 100.
  • the display unit 130 may display a screen including an input image, a screen for inputting a conversion size, a screen including a generated converted image, etc.
  • the display unit 130 includes a liquid crystal display (LCD), a light emitting diode (LED) display, an organic light emitting diode (OLED) display, and a micro electro mechanical systems (MEMS) display. and electronic paper displays.
  • LCD liquid crystal display
  • LED light emitting diode
  • OLED organic light emitting diode
  • MEMS micro electro mechanical systems
  • the display unit 130 may be combined with the input unit 110 and implemented as a touch screen.
  • the memory 140 stores operation programs of the scaling device 100.
  • the memory 140 is a non-volatile storage that can preserve data (information) regardless of whether power is provided, and data to be processed by the processor 150 is loaded. If power is not provided, the data is stored. Includes memory with volatile properties that cannot be preserved. Storage includes flash memory, HDD (hard-disc drive), SSD (solid-state drive), ROM (Read Only Memory), etc., and memory includes buffer and RAM (Random Access Memory). etc.
  • it may include two or more memories. At this time, two or more memories store information for each line in the width direction or height direction of the image, but if the number of lines is greater than the number of memories, the memory can be used like a ring buffer to sequentially store information.
  • the memory 140 stores information about the plurality of groups or is necessary in the process of performing image scaling. Calculation programs, etc. can be stored.
  • the processor 150 may control at least one other component (eg, hardware or software component) of the scaling device 100 by executing software such as a program, and may perform various data processing or calculations.
  • software such as a program
  • the processor 150 may include a division design block 151 and a fixed point design block 152. At this time, the division design block 151 and the fixed point design block 152 may be configured as circuits electrically connected to each other.
  • the conversion multiple can be identified using the division design block 151 and the fixed point design block 152.
  • the transformation multiplier according to an embodiment of the present invention is a transformation multiplier corresponding to the width of the input image (hereinafter referred to as the first transformation multiplier) and a transformation multiplier corresponding to the height of the input image (hereinafter referred to as the second transformation multiplier). .) includes. At this time, the conversion multiple consists of an integer value and a decimal value.
  • the division design block 151 divides the size and transformation size of the input image 10 to obtain a quotient and a remainder, and identifies the obtained quotient as an integer value of the transformation multiple.
  • the decimal value may appear as a finite decimal number, but it may also appear as an infinite decimal number.
  • the width of the input image is 10 pixels and the width of the conversion size is 4 pixels
  • the integer value of the conversion multiplier is 2
  • the decimal value is 0.5
  • the conversion multiple is 1/2.5 times.
  • decimal values must be expressed as binary numbers in a circuit.
  • the scaling device 100 uses a fixed-point design block 152 designed to express the decimal value of the conversion multiple in binary bit units.
  • the fixed point design block 152 may identify decimal values of the first and second conversion multiples using the remainder and conversion size identified by the division design block 151.
  • the processor 150 receives an input image, information about the size of the input image, and information about the transformation size, and based on the size of the input image and the transformation size, a first transformation multiple corresponding to the width and a second transformation multiple corresponding to the height. Identify the transformation multiplier, divide the plurality of pixels of the input image into first plurality groups based on either the first transformation multiplier or the second transformation multiplier, and sequentially store information about the first plurality groups in two or more memories. After storing the first plurality of groups into the second plurality of groups based on the remaining one of the first transformation multiplier and the second transformation multiplier, the average value of the pixels included in each of the second plurality of groups is identified to create a converted image. creates .
  • Figure 3 is a diagram illustrating an operation flowchart of an image scaling device according to an embodiment of the present invention.
  • the processor 150 receives the input image 10, information about the size of the input image 10, and information about the conversion size (S10).
  • the input image 10 can be received from the outside, but is not limited to this and can be pre-stored in the memory 140 and used.
  • the processor 150 may identify information about the size of the input image 10 from the input image 10, and receive user input about the size or conversion size of the input image 10 through the input unit 110. , information about the conversion size can be received from the outside.
  • the processor 150 identifies a first transform multiplier corresponding to the width and a second transform multiplier corresponding to the height based on the size and transform size of the input image (S20).
  • the processor 150 includes a division design block 151 and a fixed point design block 152, and conversion is performed using the division design block 151 and the fixed point design block 152. Multiples can be identified.
  • the division design block 151 may obtain a quotient and a remainder by dividing the width of the input image 10 and the width of the transformation size, and identify the quotient as an integer value of the first transformation multiple. Likewise, the division design block 151 may obtain a quotient and a remainder by dividing the height of the input image 10 and the height of the transformation size, and identify the quotient as an integer value of the second transformation multiple.
  • the fixed point design block 152 uses the remainder and the transform size identified by the division design block 151 to identify the decimal value of the transform multiple. At this time, the fixed point design block 152 may receive the remaining information from the division design block 151.
  • the processor 150 divides a plurality of pixels of the input image into a first plurality of groups based on either a first transform multiplier or a second transform multiplier and sequentially divides the plurality of pixels into the first plurality groups.
  • Information about is stored in two or more memories (S30).
  • the scaling process consists of reduction/enlargement in the width and height directions, respectively. At this time, the scaling order in the width and height directions does not affect the final result.
  • the converted image obtained by first reducing it by 1/2.5 times in the width direction and then reducing it by 1/4.5 times in the height direction, and The converted image obtained by reducing the image by 1/4.5 times in the height direction and then reducing it by 1/2.5 times in the width direction is the same.
  • the processor 150 may divide a plurality of pixels of the input image into a first plurality of groups according to a conversion multiplier in the width direction or the height direction, whichever scales first.
  • the processor 150 selects the pixels included for each line in the width direction among the plurality of pixels forming the input image to the first transformation multiplier.
  • a first plurality of groups can be created by grouping accordingly.
  • one transformation multiplier is a second transformation multiplier, that is, when scaling is performed in the height direction first
  • the processor 150 divides the pixels included for each line in the height direction among the plurality of pixels constituting the input image into a second transformation multiplier.
  • a first plurality of groups can be created by grouping according to the conversion multiple. A specific example of performing grouping will be described with reference to FIG. 5.
  • the processor 150 may sequentially store information about the first plurality of groups in two or more memories.
  • the information about the first plurality of groups includes information about the sum of the number of pixels included in each group and the pixel values of the pixels included in each group. The process of storing in memory will be described in detail with reference to FIG. 6.
  • the processor 150 groups the first plurality of groups into a second plurality of groups based on the remaining one of the first transformation multiplier and the second transformation multiplier, and then groups each of the second plurality groups.
  • the converted image 30 is generated by identifying the average value of the pixels included in (S40).
  • the processor 150 sequentially reads information about the first plurality of groups as many lines as the number of lines corresponding to the integer value of the remaining conversion multiple, and converts the first plurality of groups into the second plurality of groups. Can be grouped into groups.
  • the processor 150 sequentially reads information about the first plurality of groups as many lines as the number of lines corresponding to the integer value of the second transformation multiplier. .
  • the processor 150 generates a second plurality of groups by reading one more line than the number of lines corresponding to the integer value each time the sum of the decimal values of the conversion multiples exceeds 1 while reading.
  • the converted image 30 is ultimately created by continuously performing the process of reducing a plurality of pixels to one pixel in the case of downscaling, and the processor 150 determines the average value of the pixels included in each group for each of the second plurality of groups.
  • the converted image 30 can be generated by identifying .
  • scaling can be performed faster and with fewer constraints on conversion multiples through a hardware configuration.
  • the conversion multiplier can be freely configured, so the usability of the conversion image, such as for AI learning, can be increased.
  • learning performance can be improved.
  • FIG. 4 is a diagram illustrating an operation flowchart for identifying a conversion multiplier of an image scaling device according to an embodiment of the present invention.
  • FIG. 4 shows an operational flow diagram of the fixed point design block 152 identifying a conversion multiple in relation to S20 of FIG. 3.
  • the input image 10 has a size of 9 pixels * 13 pixels
  • the conversion size has a size of 2 pixels * 7 pixels
  • the first image corresponding to the height of the input image 10 is assumed to be 2 pixels * 7 pixels. 2Describes the process of calculating the decimal value of a conversion multiple. At this time, the decimal value is identified in bit units as described above.
  • the fixed-point design block 152 receives information about the remainder from the division design block 151 and receives information about the transform size (S21). At this time, when 13 is divided by 7, the quotient is 1 and the remainder is 6. The corresponding transformation size is 7.
  • the fixed point design block 152 identifies whether the transform size is less than twice the remainder (S22). 7 is less than 12, which is twice 6 (Yes in S22).
  • the fixed point design block 152 specifies the highest bit value of the decimal value as 1 and outputs (remainder * 2 - conversion size). (S23).
  • decimal values will be represented by 8 bits. At this time, the highest bit value means the first bit value among 8 bits.
  • the fixed-point design block 152 sets the highest bit value of the decimal value to 0 and outputs the remainder doubled (S24).
  • the fixed point design block 152 identifies whether the transform size is less than twice the previous output value (S25).
  • the previous output value refers to the value output by the fixed-point design block 152 before each step.
  • the fixed point design block 152 sets the next bit value of the decimal value to 1 and outputs (previous output value * 2 - conversion size) ( S26).
  • the fixed point design block 152 sets the next bit value of the decimal value to 0 and outputs the previous output value by doubling it (S27).
  • the fixed-point design block 152 checks whether the bit value for the decimal value has been completed with 8 bits (S28), and if not yet completed (No in S28), returns to step S25 to identify the next bit value.
  • the integer value of the second conversion multiple is 1, and the decimal value can be expressed as 0.11011011(2) in binary.
  • Figure 5 is a diagram showing a downscaling operation of an image scaling device according to an embodiment of the present invention.
  • FIG. 5 provides a detailed explanation of dividing a plurality of pixels of an input image into a first plurality of groups and a second plurality of groups with reference to S30 and S40 of FIG. 3 .
  • the example assumes that, as in FIG. 4, the input image 10 has a size of 9 pixels*13 pixels, the transformation size has a size of 2 pixels*7 pixels, and scaling is performed first based on the first transformation multiple. do.
  • the first transformation multiple in the width direction is 1/4.5.
  • the processor 150 may divide the plurality of pixels of the input image 10 into a first plurality of groups based on the first transformation multiplier.
  • the processor 150 may generate a first plurality of groups by grouping pixels included in each line in the width direction among the plurality of pixels forming the input image 10 according to the first transformation multiplier.
  • the processor 150 groups the 9 pixels included in line 1 of the lines in the width direction of the input image 10 into one group 11 with the integer value of the first transform multiple being 4. , the remaining 5 pixels can be grouped into another group (12).
  • group 12 since the integer 1 is obtained by combining the decimal value 0.5 of the first conversion multiple of group 11 and the decimal value 0.5 of the first conversion multiple of group 12, group 12 has the integer value 4 of the first conversion multiple. It consists of 5 pixels, including one more pixel.
  • the processor 150 stores information about the first plurality of groups in the memory 140, including information on the sum of the number of pixels included in each group and the pixel values of the pixels included in each group.
  • the pixel value may include brightness information, color information, etc. of the corresponding pixel.
  • the pixel value can range between 0 and 255 by expressing 1 pixel in 8 bits. Black has a pixel value of 0 and white has a pixel value of 255.
  • the pixel value can range between 0 and 255 for each color component by expressing 1 pixel with 8 bits for each color component of R (red), G (green), and B (blue). there is.
  • black has a pixel value of (0, 0, 0)
  • white has a pixel value of (255, 255, 255).
  • the pixel value of all pixels is 10, in the case of group 11, information on 4 pixels and the total of 40 pixel values is stored in the memory.
  • the image 510 can be generated reduced in the width direction. At this time, group 11 can be converted into pixel 511 and group 12 can be converted into pixel 512.
  • the present invention does not directly scale, but sequentially stores information about the first plurality of groups in the memory 140.
  • the processor 150 sequentially reads information about the first plurality of groups as many lines as the number of lines corresponding to the integer value of the remaining second conversion multiple and groups the first plurality of groups into the second plurality of groups. You can.
  • the second transformation multiplier in the height direction is 1/1.85546875.
  • the processor 150 sequentially reads information about the first plurality of groups as many lines as the number of lines corresponding to the integer value of the second conversion multiple. At this time, the processor 150 generates a second plurality of groups by reading one more line than the number of lines corresponding to the integer value each time the sum of the decimal values of the conversion multiples exceeds 1 while reading.
  • the processor 150 can read group 11 and group it into group 31.
  • the sum of the decimal value 0.85546875 of group (11) and the decimal value of group (13) 0.85546875 exceeds 1 (1.7109375), so read the two groups (13) and group (14) with one more than 1 of the integer value. It can be grouped into groups (32).
  • the 26 first plural groups can be grouped into 14 second plural groups.
  • the processor 150 may generate the converted image 30 by identifying the average value of pixels included in each group for each of the second plurality of groups.
  • group 31 has 4 pixels and 40 pixel values, and has a pixel value of 10, which is the average value of the pixels.
  • Group 32 has 8 pixels and 80 pixel values, and has a pixel value of 10, which is the average value of the pixels.
  • Group 33 has 8 pixels and 80 pixel values, and has a pixel value of 10, which is the average value of the pixels.
  • Figure 6 is a diagram showing the operation of an image scaling device according to an embodiment of the present invention.
  • FIG. 6 shows the scaling process described with reference to FIG. 5 being performed using memory.
  • the scaling device 100 has two or more memories 140.
  • the memory 140 consists of 17 memories. At this time, the number and structure of memories are not limited by this drawing.
  • the processor 150 groups the pixels included in each line in the width direction among the plurality of pixels forming the input image 10 according to the first transformation multiplier to form a first plurality of groups. can be created.
  • the processor 150 groups 9 pixels included in each line among the lines in the width direction of the input image 10 into one group with an integer value of the first transformation multiple of 4, and groups the remaining 5 pixels into another group. Can be grouped.
  • the processor 150 may sequentially store information about the first plurality of groups in two or more memories 140 for each line in the width direction of the input image 10.
  • the processor 150 can store information about the two groups, group 11, and group 12 constituting line 1 in memory 1, and sequentially store information about the groups for each line.
  • the processor 150 sequentially reads the information about the first plurality of groups from the memory 140 based on the second conversion multiplier and The first plurality of groups can be grouped into the second plurality of groups.
  • the second conversion multiplier is 1/1.85546875
  • the information in memory 1 is read as is, and memory 2 and memory 3, and memory 4 and memory 5 are read based on the second conversion multiple.
  • memory 6 and memory 7, memory 8 and memory 9, memory 10 and memory 11, and memory 12 and memory 13 can be read together.
  • the processor 150 can immediately output the pixel value of the converted image 30 by reading information from the memories together and performing calculations immediately.
  • FIG. 7 is a diagram illustrating an upscaling operation of an image scaling device according to an embodiment of the present invention.
  • the processor 150 may identify pixel values of a plurality of pixels of the input image 10 and identify a plurality of intermediate pixel values between each pixel and at least one neighboring pixel. .
  • the pixel values of a plurality of pixels of the input image 10 are 10, 20, and 30, respectively.
  • a plurality of intermediate pixel values between a pixel with a pixel value of 10 and a neighboring pixel with a pixel value of 20 are obtained.
  • the plurality of intermediate pixel values may be an average value of pixel values and may include an intermediate value between any one pixel value and the average value. That is, the middle pixel value between 10 and 20 may be 15, which is the average value, 12, which is the middle value between 10 and 15, and 17, which is the middle value between 15 and 20.
  • the plurality of intermediate pixel values between 10 and 20 may be 12, 15, and 17. At this time, the calculation can be done more precisely depending on the number of pixels to be added.
  • the processor 150 may store upscaling information including pixel values and intermediate pixel values for each number of pixels to be added in two or more memories 140 .
  • upscaling information including 10 and 15 can be stored, and if you want to add 2 pixels, upscaling information including 10, 12, and 17 can be stored.
  • the processor 150 may list and store the number of pixels and the corresponding pixel values.
  • the memory 140 can be used as a ring buffer depending on the number of lines, and can also be used as a plurality of ring buffers divided by a certain number of memories.
  • upscaling like downscaling, identifies a conversion multiplier.
  • the processor 150 may store first up-scaling information including a pixel value based on the first transform multiplier and an intermediate pixel value corresponding to the number of pixels to be added in two or more memories. .
  • the input image 710 has a size of 3 pixels*2 pixels
  • the transformation size has a size of 9 pixels*6 pixels, and is first upscaled based on the first transformation multiplier.
  • the processor 150 uses the division design block 151 and the fixed point design block 152 as described above to achieve a first conversion multiple of 3 and a second conversion multiple of 3. A breach of trust can be identified.
  • the processor 150 identifies first up-scaling information including a pixel value and an intermediate pixel value corresponding to the number of pixels to be added based on the first transform multiplier.
  • the processor 150 outputs four intermediate pixel values 12, 15, 17, and 18 between pixels 10 and 20 in line 1, and two intermediate pixel values 23 between pixels 20 and 30. Identify 27, and in line 2 identify the four intermediate pixel values 22, 25, 27, and 28 between pixels 20 and 30 and the two intermediate pixel values 32 and 37 between pixels 30 and 40.
  • the processor 150 identifies first up-scaling information including the identified pixel values. If the processor 150 immediately performs scaling, an image 720 enlarged in the width direction can be generated. However, in the present invention, scaling is not performed immediately, and the first up-scaling information is sequentially stored in the memory 140.
  • the processor 150 identifies second up-scaling information including an intermediate pixel value corresponding to the number of pixels to be added based on the first up-scaling information and the second transform multiplier.
  • line 1 of the middle image 720 has pixels with pixel values 10, 12, 15, 17, 18, 20, 23, 27, and 30, and line 2 has pixel values 20, 22, 25, and 27. There are pixels numbered , 28, 30, 32, 37, and 40.
  • the processor 150 identifies second up-scaling information including intermediate pixel values of 4 lines between line 1 and line 2, and sequentially reads the second up-scaling information to create a converted image. Generates (730).
  • FIG. 8 is a diagram illustrating a lookup table for the number of pixels to be added according to the conversion multiplier during upscaling of the image scaling device according to an embodiment of the present invention.
  • the lookup table 800 shown in FIG. 8 indicates the number of additional pixels according to the conversion multiplier.
  • the processor 150 may identify the number of pixels to be added according to the first transform multiplier and the second transform multiplier based on the lookup table 800.
  • the first transform multiple of the input image 710 of FIG. 7 is 3 times and the second transform multiple is 3 times.
  • the lookup table 800 when the conversion multiple is 3, the number of additional pixels between initial pixels is 4, and the number of additional pixels between subsequent pixels is 2.
  • the input image has a size of 4 pixels x 4 pixels
  • the conversion size has a size of 11 pixels x 6 pixels
  • the first conversion multiple is 2.75 times
  • the second conversion multiple is 1.5 times.
  • the number of additional pixels between initial pixels is 3, and the number of additional pixels between subsequent pixels is 1 or 2.
  • the number of additional pixels between initial pixels is 3, and the number of additional pixels thereafter is set to 1 if the sum of the decimal values of the conversion multiples does not exceed 1, and 2 if the sum of the decimal values of the conversion multiples exceeds 1.
  • 3 additional pixels are required between the first and second pixels, 2 additional pixels are required between the 2nd and 3rd pixels, and 2 additional pixels are required between the 3rd and 4th pixels.
  • Figure 9 is a diagram showing the operation of an image scaling device according to an embodiment of the present invention.
  • FIG. 9 shows the scaling process described with reference to FIG. 7 being performed using memory.
  • the scaling device 100 has two or more memories 140.
  • the memory 140 consists of 17 memories. At this time, the number and structure of memories are not limited by this drawing.
  • the processor 150 generates a first pixel value including a pixel value of a plurality of pixels constituting the input image 710 and an intermediate pixel value corresponding to the number of pixels to be added based on the first transform multiplier.
  • Upscaling information can be stored in two or more memories 140.
  • the processor 150 sequentially stores first up-scaling information in the memory 140 for each line of the input image 710 of FIG. 7 .
  • the processor 150 stores the first upscaling information ⁇ (5, 10, 12, 15, 17, 18), (3, 20, 23, 27), (1, 30) ⁇ of line 1 in memory 1, and , the first upscaling information ⁇ (5,20,22,25,27,28), (3,30,33,37), (1,40) ⁇ of line 2 is stored in memory 2.
  • FIG. 9 there are 17 memories shown in FIG. 9, but they are composed of two lines, and the first up-scaling information is stored up to memory 2. If the number of lines is greater than the number of memories, the memory can be used like a ring buffer and stored in the first memory order again.
  • the processor 150 When the first up-scaling information is sequentially stored in the memory 140, the processor 150 generates a second up-scaling information including an intermediate pixel value corresponding to the number of pixels to be added based on the first up-scaling information and the second transform multiplier. Scaling information can be stored in two or more memories 140.
  • the processor 150 may store second up-scaling information corresponding to each of the six lines increased according to the number of pixels added in the height direction in memories 3 to 8.
  • the processor 150 may sequentially read the second up-scaling information stored in memories 3 to 8 to generate the converted image 730. At this time, by storing the second up-scaling information for each line in each memory, information omission that may occur when generating a converted image due to communication failure, etc. can be prevented.

Abstract

An image scaling device, according to one embodiment of the present invention, comprises: two or more memories; and a processor which receives an input image, information related to the size of the input image, and information related to a conversion size, identifies a first conversion multiple corresponding to width and a second conversion multiple corresponding to height on the basis of the size of the input image and the conversion size, divides a plurality of pixels of the input image into a first plurality of groups on the basis of any one conversion multiple among the first conversion multiple and the second conversion multiple, and consecutively stores information related to the first plurality of groups in the two or more memories, groups the first plurality of groups into a second plurality of groups on the basis of the other conversion multiple among the first conversion multiple and the second conversion multiple, and then identifies the average values of the pixels included in the respective second plurality of groups, and thus generates a converted image.

Description

이미지 스케일링 장치 및 이미지 스케일링 방법Image scaling device and image scaling method
본 발명은 이미지 스케일링 장치 및 이미지 스케일링 방법에 관한 것이다.The present invention relates to an image scaling device and an image scaling method.
인공지능 기술의 발달에 따라 이미지를 입력데이터로 학습하는 AI 학습이나 추론 가속기가 활발하게 개발되고 있다. 이때, 이미지들은 서로 다른 크기를 가질 수 있고, AI 학습이나 추론 가속기 별로 설계되는 이미지 해상도가 다르므로, 가속기의 설계에 맞게 입력되는 이미지의 크기 변환이 필요하다. With the development of artificial intelligence technology, AI learning or inference accelerators that learn images as input data are being actively developed. At this time, images may have different sizes, and the image resolution designed for each AI learning or inference accelerator is different, so it is necessary to convert the size of the input image to suit the design of the accelerator.
이 외에도 이미지가 사용되는 기술의 경우 언제나 크기 변환의 이슈가 존재하는 바, 이미지 스케일링에 대한 기술의 개발이 요구되는 실정이다. In addition, in the case of technology that uses images, there is always an issue of size conversion, so the development of technology for image scaling is required.
이때, 이미지 스케일링을 소프트웨어 프로그래밍으로 구현하는 경우, 처리속도가 저하되어 실시간 처리가 힘들기 때문에 하드웨어를 기반으로 설계하여 실시간 처리할 필요가 있다.At this time, when image scaling is implemented through software programming, the processing speed is reduced and real-time processing is difficult, so it is necessary to design it based on hardware and perform real-time processing.
또한, 기존의 이미지 스케일링 기술은 1/2배, 1/3배, 1/4배와 같이 변환 배수에 제한이 있어 원하는 크기로 이미지를 변환하기 위해 이미지의 일부를 임의로 커팅하는 등 품질 저하의 우려도 존재한다.In addition, existing image scaling technology has limitations in conversion multiples such as 1/2 times, 1/3 times, and 1/4 times, so there are concerns about quality deterioration, such as arbitrarily cutting part of the image to convert the image to the desired size. also exists.
본 발명의 목적은 보다 변환 크기의 자유도가 높은 이미지 스케일링 장치 및 이미지 스케일링 방법을 제공하는 것이다.The purpose of the present invention is to provide an image scaling device and an image scaling method with a higher degree of freedom in conversion size.
본 발명의 목적은 보다 높은 품질로 이미지의 크기를 변환하는 이미지 스케일링 장치 및 이미지 스케일링 방법을 제공하는 것이다.The purpose of the present invention is to provide an image scaling device and an image scaling method that convert the size of an image to higher quality.
본 발명의 일 실시예에 따른 이미지 스케일링 장치에 있어서, 2 이상의 메모리; 입력 이미지, 상기 입력 이미지의 크기에 대한 정보 및 변환 크기에 대한 정보를 수신하고, 상기 입력 이미지의 크기 및 상기 변환 크기에 기초하여 너비에 대응하는 제1변환 배수 및 높이에 대응하는 제2변환 배수를 식별하고, 상기 제1변환 배수 및 상기 제2변환 배수 중 어느 하나의 변환 배수에 기초하여 상기 입력 이미지의 복수의 픽셀을 제1복수의 그룹으로 나누어 순차적으로 상기 제1복수의 그룹에 대한 정보를 상기 2 이상의 메모리에 저장하고, 상기 제1변환 배수 및 상기 제2변환 배수 중 나머지 하나의 변환 배수에 기초하여 상기 제1복수의 그룹을 제2복수의 그룹으로 묶은 후, 상기 제2복수의 그룹 각각에 포함된 픽셀의 평균값을 식별하여 변환 이미지를 생성하는 프로세서를 포함한다.An image scaling device according to an embodiment of the present invention, comprising: two or more memories; Receive an input image, information about the size of the input image, and information about the transformation size, and based on the size of the input image and the transformation size, a first transformation multiplier corresponding to the width and a second transformation multiplier corresponding to the height Identifying and dividing the plurality of pixels of the input image into a first plurality of groups based on any one of the first transformation multiplier and the second transformation multiplier, and sequentially providing information about the first plurality of groups. is stored in the two or more memories, and the first plurality of groups are grouped into a second plurality of groups based on the remaining one of the first conversion multiplier and the second conversion multiple. It includes a processor that generates a converted image by identifying the average value of pixels included in each group.
상기 프로세서는 나눗셈 설계 블록 및 고정 소수점 설계 블록을 포함하고, 상기 나눗셈 설계 블록은, 상기 입력 이미지의 크기 및 상기 변환 크기를 나누어 획득한 몫과 나머지 중 상기 몫을 상기 제1변환 배수 및 상기 제2변환 배수의 정수값으로 식별하고, 상기 고정 소수점 설계 블록은, 상기 나머지 및 상기 변환 크기를 이용하여 상기 제1변환 배수 및 상기 제2변환 배수의 소수값을 식별할 수 있다.The processor includes a division design block and a fixed-point design block, and the division design block divides the size of the input image and the transformation size and divides the quotient and the remainder into the first transformation multiplier and the second transformation multiplier. The conversion multiplier is identified as an integer value, and the fixed-point design block can identify decimal values of the first conversion multiple and the second conversion multiple using the remainder and the conversion size.
상기 고정 소수점 설계 블록은, (1) 상기 변환 크기가 상기 나머지의 2배보다 작은 경우, 상기 소수값의 최상 비트값을 1로 지정하고, 상기 나머지의 2배에서 상기 변환 크기를 뺀 값을 출력하고, 또는 상기 변환 크기가 상기 나머지의 2배보다 작지 않은 경우, 상기 소수값의 최상 비트값을 0으로 지정하고, 상기 나머지를 2배한 값을 출력하고, (2) 상기 변환 크기가 이전 단계의 출력값의 2배보다 작은 경우, 상기 소수값의 다음 비트값을 1로 지정하고, 상기 이전 단계의 출력값의 2배에서 상기 변환 크기를 뺀 값을 출력하고, 또는 상기 변환 크기가 상기 이전 단계의 출력값의 2배보다 작지 않은 경우, 상기 소수값의 다음 비트값을 0으로 지정하고, 상기 이전 단계의 출력값을 2배한 값을 출력하고, (3) 상기 소수값이 8개의 2진수 비트값을 가질 때까지 상기 (2) 단계를 반복할 수 있다.The fixed-point design block: (1) If the conversion size is less than twice the remainder, sets the most significant bit value of the decimal value to 1, and outputs a value obtained by subtracting the conversion size from two times the remainder. or, if the conversion size is not smaller than twice the remainder, the most significant bit value of the decimal value is set to 0, and a value obtained by doubling the remainder is output, and (2) the conversion size is equal to that of the previous step. If the output value is less than 2 times, the next bit value of the decimal value is set to 1, and a value obtained by subtracting the conversion size from 2 times the output value of the previous step is output, or the conversion size is equal to the output value of the previous step. If it is not less than twice, the next bit value of the decimal value is designated as 0, and a value twice the output value of the previous step is output. (3) When the decimal value has 8 binary bit values, You can repeat step (2) above until.
상기 프로세서는, 상기 어느 하나의 변환 배수가 상기 제1변환 배수인 경우 상기 입력 이미지의 너비 방향의 라인 별 포함된 픽셀들을 상기 제1변환 배수에 따라 그루핑(grouping)하고, 상기 어느 하나의 변환 배수가 상기 제2변환 배수인 경우 상기 입력 이미지의 높이 방향의 라인 별 포함된 픽셀들을 상기 제2변환 배수에 따라 그루핑하여 상기 제1복수의 그룹을 생성할 수 있다. When the one transform multiple is the first transform multiple, the processor groups the pixels included in each line in the width direction of the input image according to the first transform multiple, and groups the pixels included in each line in the width direction of the input image according to the first transform multiple. When is the second transformation multiplier, the first plurality of groups can be generated by grouping pixels included in each line in the height direction of the input image according to the second transformation multiplier.
상기 프로세서는, 상기 어느 하나의 변환 배수가 상기 제1변환 배수인 경우 상기 입력 이미지의 너비 방향의 라인 별로, 상기 어느 하나의 변환 배수가 상기 제2변환 배수인 경우 상기 입력 이미지의 높이 방향의 라인 별로 상기 제1복수의 그룹에 대한 정보를 상기 2 이상의 메모리에 저장할 수 있다. The processor is configured to perform a line in the width direction of the input image when the one transform multiple is the first transform multiple, and for each line in the height direction of the input image when the one transform multiple is the second transform multiple. Information about the first plurality of groups may be separately stored in the two or more memories.
상기 제1복수의 그룹에 대한 정보는, 각 그룹에 포함된 픽셀의 수와 각 그룹에 포함된 픽셀의 픽셀값의 합의 정보를 포함하는 것을 특징으로 할 수 있다.The information about the first plurality of groups may include information about the sum of the number of pixels included in each group and the pixel values of the pixels included in each group.
상기 프로세서는, 상기 나머지 하나의 변환 배수에 기초하여 상기 2 이상의 메모리로부터 상기 제1복수의 그룹에 대한 정보를 순차적으로 읽어오면서 상기 제1복수의 그룹을 상기 제2복수의 그룹으로 묶을 수 있다.The processor may group the first plurality of groups into the second plurality of groups while sequentially reading information about the first plurality of groups from the two or more memories based on the remaining conversion multiple.
상기 프로세서는, 상기 제2복수의 그룹 중 각 그룹에 포함된 픽셀의 수와 각 그룹에 포함된 픽셀의 픽셀값의 합의 정보를 포함하는 상기 제2복수의 그룹에 대한 정보를 상기 2 이상의 메모리에 저장할 수 있다.The processor stores information about the second plurality of groups, including information on the sum of the number of pixels included in each group among the second plurality of groups and pixel values of pixels included in each group, in the two or more memories. You can save it.
상기 프로세서는, 상기 나머지 하나의 변환 배수의 정수값에 대응하는 라인 개수만큼 상기 제1복수의 그룹에 대한 정보를 순차적으로 읽어오면서 상기 제1복수의 그룹을 상기 제2복수의 그룹으로 묶고, 상기 묶이는 제2복수의 그룹의 개수만큼 상기 나머지 하나의 변환 배수의 소수값의 합을 구하고, 상기 소수값의 합이 1씩 초과할 때 마다 상기 라인 개수보다 하나 더 읽어오면서 상기 제1복수의 그룹을 상기 제2복수의 그룹으로 묶을 수 있다.The processor sequentially reads information about the first plurality of groups as many lines as the number of lines corresponding to the integer value of the remaining conversion multiple, and groups the first plurality of groups into the second plurality of groups, The sum of the decimal values of the remaining conversion multiples is calculated as the number of the second plurality of groups, and each time the sum of the decimal values exceeds 1, one more number than the number of lines is read to form the first plurality of groups. It can be grouped into the second plurality group.
상기 프로세서는, 상기 입력 이미지의 복수의 픽셀의 픽셀값을 식별하고, 상기 각 픽셀과 이웃하는 적어도 하나의 픽셀 간 복수의 중간 픽셀값을 식별하고, 상기 제1변환 배수에 기초하여 상기 픽셀값 및 추가할 픽셀 수에 대응하는 상기 중간 픽셀값을 포함하는 제1업 스케일링 정보를 상기 2 이상의 메모리에 저장하고, 상기 제1업 스케일링 정보 및 상기 제2변환 배수에 기초하여 추가할 픽셀 수에 대응하는 중간 픽셀값을 포함하는 제2업 스케일링 정보를 상기 2 이상의 메모리에 저장하고, 상기 2 이상의 메모리에 저장된 상기 제2업 스케일링 정보를 순차적으로 읽어 상기 변환 이미지를 생성할 수 있다.The processor identifies pixel values of a plurality of pixels of the input image, identifies a plurality of intermediate pixel values between each pixel and at least one neighboring pixel, and based on the first transformation multiplier, the pixel value and Store first up-scaling information including the intermediate pixel value corresponding to the number of pixels to be added in the two or more memories, and store first up-scaling information including the intermediate pixel value corresponding to the number of pixels to be added, and corresponding to the number of pixels to be added based on the first up-scaling information and the second transform multiplier. The converted image may be generated by storing second up-scaling information including intermediate pixel values in the two or more memories, and sequentially reading the second up-scaling information stored in the two or more memories.
본 발명의 일 실시예에 따른 이미지 스케일링 장치에 의해 수행되는 이미지 스케일링 방법에 있어서, 입력 이미지, 상기 입력 이미지의 크기에 대한 정보 및 변환 크기에 대한 정보를 수신하는 단계; 상기 입력 이미지의 크기 및 상기 변환 크기에 기초하여 너비에 대응하는 제1변환 배수 및 높이에 대응하는 제2변환 배수를 식별하는 단계; 상기 제1변환 배수 및 상기 제2변환 배수 중 어느 하나의 변환 배수에 기초하여 상기 입력 이미지의 복수의 픽셀을 제1복수의 그룹으로 나누어 순차적으로 상기 제1복수의 그룹에 대한 정보를 저장하는 단계; 상기 제1변환 배수 및 상기 제2변환 배수 중 나머지 하나의 변환 배수에 기초하여 상기 제1복수의 그룹을 제2복수의 그룹으로 묶은 후, 상기 제2복수의 그룹 각각에 포함된 픽셀의 평균값을 식별하여 변환 이미지를 생성하는 단계를 포함한다.An image scaling method performed by an image scaling device according to an embodiment of the present invention, comprising: receiving an input image, information about the size of the input image, and information about the transformation size; identifying a first transform multiplier corresponding to the width and a second transform multiplier corresponding to the height based on the size of the input image and the transform size; Dividing a plurality of pixels of the input image into a first plurality of groups based on one of the first transformation multiplier and the second transformation multiplier and sequentially storing information about the first plurality of groups ; After grouping the first plurality of groups into a second plurality of groups based on the remaining one of the first transformation multiplier and the second transformation multiplier, the average value of the pixels included in each of the second plurality of groups is calculated. It includes the step of identifying and generating a converted image.
상기 제1변환 배수 및 상기 제2변환 배수를 식별하는 단계는, 상기 입력 이미지의 크기 및 상기 변환 크기를 나누어 획득한 몫과 나머지 중 상기 몫을 상기 제1변환 배수 및 상기 제2변환 배수의 정수값으로 식별하는 단계; 상기 나머지 및 상기 변환 크기를 이용하여 상기 제1변환 배수 및 상기 제2변환 배수의 소수값을 식별하는 단계를 포함할 수 있다.The step of identifying the first transform multiplier and the second transform multiplier includes dividing the quotient obtained by dividing the size of the input image and the transform size and dividing the quotient among the remainder into integers of the first transform multiplier and the second transform multiplier. identifying by value; It may include identifying decimal values of the first transform multiple and the second transform multiple using the remainder and the transform size.
상기 제1변환 배수 및 상기 제2변환 배수의 소수값을 식별하는 단계는, (1) 상기 변환 크기가 상기 나머지의 2배보다 작은 경우, 상기 소수값의 최상 비트값을 1로 지정하고, 상기 나머지의 2배에서 상기 변환 크기를 뺀 값을 출력하고, 또는 상기 변환 크기가 상기 나머지의 2배보다 작지 않은 경우, 상기 소수값의 최상 비트값을 0으로 지정하고, 상기 나머지를 2배한 값을 출력하는 단계; (2) 상기 변환 크기가 이전 단계의 출력값의 2배보다 작은 경우, 상기 소수값의 다음 비트값을 1로 지정하고, 상기 이전 단계의 출력값의 2배에서 상기 변환 크기를 뺀 값을 출력하고, 또는 상기 변환 크기가 상기 이전 단계의 출력값의 2배보다 작지 않은 경우, 상기 소수값의 다음 비트값을 0으로 지정하고, 상기 이전 단계의 출력값을 2배한 값을 출력하는 단계; (3) 상기 소수값이 8개의 2진수 비트값을 가질 때까지 상기 (2) 단계를 반복하는 단계를 포함할 수 있다.The step of identifying the decimal value of the first transform multiple and the second transform multiple includes (1) when the transform size is less than twice the remainder, specifying the highest bit value of the decimal value as 1, and Output a value obtained by subtracting the conversion size from 2 times the remainder, or, if the conversion size is not smaller than 2 times the remainder, specify the most significant bit value of the decimal value as 0, and output a value obtained by subtracting the conversion size from 2 times the remainder. output step; (2) If the conversion size is less than twice the output value of the previous step, set the next bit value of the decimal value to 1, and output a value obtained by subtracting the conversion size from twice the output value of the previous step, Or, if the conversion size is not smaller than twice the output value of the previous step, designating the next bit value of the decimal value as 0 and outputting a value that is twice the output value of the previous step; (3) It may include repeating step (2) until the decimal value has 8 binary bit values.
상기 제1복수의 그룹에 대한 정보를 저장하는 단계는, 상기 어느 하나의 변환 배수가 상기 제1변환 배수인 경우 상기 입력 이미지의 너비 방향의 라인 별 포함된 픽셀들을 상기 제1변환 배수에 따라 그루핑(grouping)하고, 상기 어느 하나의 변환 배수가 상기 제2변환 배수인 경우 상기 입력 이미지의 높이 방향의 라인 별 포함된 픽셀들을 상기 제2변환 배수에 따라 그루핑하여 상기 제1복수의 그룹을 생성하는 단계를 포함할 수 있다.The step of storing information about the first plurality of groups includes grouping pixels included in each line in the width direction of the input image according to the first transform multiplier when one of the transform multipliers is the first transform multiplier. (grouping), and when one of the transformation multipliers is the second transformation multiplier, the pixels included in each line in the height direction of the input image are grouped according to the second transformation multiplier to generate the first plurality of groups. May include steps.
상기 제1복수의 그룹에 대한 정보를 저장하는 단계는, 상기 어느 하나의 변환 배수가 상기 제1변환 배수인 경우 상기 입력 이미지의 너비 방향의 라인 별로, 상기 어느 하나의 변환 배수가 상기 제2변환 배수인 경우 상기 입력 이미지의 높이 방향의 라인 별로 상기 제1복수의 그룹에 대한 정보를 저장하는 단계를 포함할 수 있다.The step of storing information about the first plurality of groups may include, if the one transform multiple is the first transform multiple, for each line in the width direction of the input image, the one transform multiple is the second transform multiple. If it is a multiple, the method may include storing information about the first plurality of groups for each line in the height direction of the input image.
상기 변환 이미지를 생성하는 단계는, 상기 나머지 하나의 변환 배수에 기초하여 저장된 상기 제1복수의 그룹에 대한 정보를 순차적으로 읽어오면서 상기 제1복수의 그룹을 상기 제2복수의 그룹으로 묶는 단계를 포함할 수 있다.The step of generating the conversion image includes sequentially reading information about the first plurality of groups stored based on the remaining conversion multiple and grouping the first plurality of groups into the second plurality of groups. It can be included.
상기 제1복수의 그룹을 상기 제2복수의 그룹으로 묶는 단계는, 상기 제2복수의 그룹 중 각 그룹에 포함된 픽셀의 수와 각 그룹에 포함된 픽셀의 픽셀값의 합의 정보를 포함하는 상기 제2복수의 그룹에 대한 정보를 저장하는 단계를 포함할 수 있다.The step of grouping the first plurality of groups into the second plurality of groups includes information on the sum of the number of pixels included in each group among the second plurality of groups and the pixel values of the pixels included in each group. It may include the step of storing information about the second plurality of groups.
상기 제2복수의 그룹으로 묶는 단계는, 상기 나머지 하나의 변환 배수의 정수값에 대응하는 라인 개수만큼 상기 제1복수의 그룹에 대한 정보를 순차적으로 읽어오면서 상기 제1복수의 그룹을 상기 제2복수의 그룹으로 묶는 단계; 상기 묶이는 제2복수의 그룹의 개수만큼 상기 나머지 하나의 변환 배수의 소수값의 합을 구하는 단계; 상기 소수값의 합이 1씩 초과할 때 마다 상기 라인 개수보다 하나 더 읽어오면서 상기 제1복수의 그룹을 상기 제2복수의 그룹으로 묶는 단계를 포함할 수 있다.The step of grouping the first plurality of groups includes sequentially reading information about the first plurality of groups as many lines as the number of lines corresponding to the integer value of the remaining conversion multiple, thereby dividing the first plurality of groups into the second plurality of groups. Grouping into a plurality of groups; calculating the sum of the decimal values of the remaining conversion multiples as many as the number of the second plurality of groups; The method may include grouping the first plurality of groups into the second plurality of groups by reading one more line than the number of lines whenever the sum of the decimal values exceeds 1.
상기 입력 이미지의 복수의 픽셀의 픽셀값을 식별하는 단계; 상기 각 픽셀과 이웃하는 적어도 하나의 픽셀 간 복수의 중간 픽셀값을 식별하는 단계; 상기 제1변환 배수에 기초하여 상기 픽셀값 및 추가할 픽셀 수에 대응하는 상기 중간 픽셀값을 포함하는 제1업 스케일링 정보를 저장하는 단계; 상기 제1업 스케일링 정보 및 상기 제2변환 배수에 기초하여 추가할 픽셀 수에 대응하는 중간 픽셀값을 포함하는 제2업 스케일링 정보를 저장하는 단계; 저장된 상기 제2업 스케일링 정보를 순차적으로 읽어 상기 변환 이미지를 생성하는 단계를 포함할 수 있다.identifying pixel values of a plurality of pixels of the input image; identifying a plurality of intermediate pixel values between each pixel and at least one neighboring pixel; storing first up-scaling information including the pixel value and the intermediate pixel value corresponding to the number of pixels to be added based on the first conversion multiplier; storing second up-scaling information including an intermediate pixel value corresponding to the number of pixels to be added based on the first up-scaling information and the second transform multiplier; It may include generating the converted image by sequentially reading the stored second up-scaling information.
본 발명의 일 실시예에 따르면, 하드웨어 구성을 통해 보다 빠르고, 변환 배수의 제약이 적은 스케일링을 수행할 수 있다. According to an embodiment of the present invention, scaling can be performed faster and with fewer constraints on conversion multiples through a hardware configuration.
본 발명의 일 실시예에 따르면, 변환 배수를 자유롭게 구성할 수 있으므로 AI 학습 등 변환 이미지 활용성이 높아질 수 있다. 특히, AI 가속기에 이용되는 경우, 학습 성능을 높일 수 있다.According to an embodiment of the present invention, the conversion multiplier can be freely configured, so the usability of the conversion image, such as for AI learning, can be increased. In particular, when used in an AI accelerator, learning performance can be improved.
도 1은 본 발명의 일 실시예에 따른 이미지 스케일링 장치를 개략적으로 도시한 도면이다.1 is a diagram schematically showing an image scaling device according to an embodiment of the present invention.
도 2는 본 발명의 일 실시예에 따른 이미지 스케일링 장치의 구성을 도시한 블럭도이다.Figure 2 is a block diagram showing the configuration of an image scaling device according to an embodiment of the present invention.
도 3은 본 발명의 일 실시예에 따른 이미지 스케일링 장치의 동작 흐름도를 도시한 도면이다.Figure 3 is a diagram illustrating an operation flowchart of an image scaling device according to an embodiment of the present invention.
도 4는 본 발명의 일 실시예에 따른 이미지 스케일링 장치의 변환 배수를 식별하는 동작 흐름도를 도시한 도면이다.FIG. 4 is a diagram illustrating an operation flowchart for identifying a conversion multiplier of an image scaling device according to an embodiment of the present invention.
도 5는 본 발명의 일 실시예에 따른 이미지 스케일링 장치의 다운 스케일링 동작 모습을 도시한 도면이다.Figure 5 is a diagram showing a downscaling operation of an image scaling device according to an embodiment of the present invention.
도 6은 본 발명의 일 실시예에 따른 이미지 스케일링 장치의 동작 모습을 도시한 도면이다.Figure 6 is a diagram showing the operation of an image scaling device according to an embodiment of the present invention.
도 7은 본 발명의 일 실시예에 따른 이미지 스케일링 장치의 업 스케일링 동작 모습을 도시한 도면이다.Figure 7 is a diagram illustrating an upscaling operation of an image scaling device according to an embodiment of the present invention.
도 8은 본 발명의 일 실시예에 따른 이미지 스케일링 장치의 업 스케일링 시 변환 배수에 따라 추가할 픽셀 수에 관한 룩업 테이블을 도시한 도면이다.FIG. 8 is a diagram illustrating a lookup table for the number of pixels to be added according to the conversion multiplier during upscaling of the image scaling device according to an embodiment of the present invention.
도 9는 본 발명의 일 실시예에 따른 이미지 스케일링 장치의 동작 모습을 도시한 도면이다.Figure 9 is a diagram showing the operation of an image scaling device according to an embodiment of the present invention.
이하, 본 발명에 따른 바람직한 실시 형태를 첨부된 도면을 참조하여 상세하게 설명한다. 첨부된 도면과 함께 이하에 개시될 상세한 설명은 본 발명의 예시적인 실시형태를 설명하고자 하는 것이며, 본 발명이 실시될 수 있는 유일한 실시형태를 나타내고자 하는 것이 아니다. 도면에서 본 발명을 명확하게 설명하기 위해서 설명과 관계없는 부분은 생략할 수 있고, 명세서 전체를 통하여 동일 또는 유사한 구성 요소에 대해서는 동일한 참조 부호를 사용할 수 있다.Hereinafter, preferred embodiments according to the present invention will be described in detail with reference to the attached drawings. The detailed description set forth below in conjunction with the accompanying drawings is intended to illustrate exemplary embodiments of the invention and is not intended to represent the only embodiments in which the invention may be practiced. In order to clearly explain the present invention in the drawings, parts unrelated to the description may be omitted, and the same reference numerals may be used for identical or similar components throughout the specification.
도 1은 본 발명의 일 실시예에 따른 이미지 스케일링 장치를 개략적으로 도시한 도면이다.1 is a diagram schematically showing an image scaling device according to an embodiment of the present invention.
도 1에 도시된 이미지 스케일링 장치(100)(이하, 스케일링 장치(100)라 한다.)는 입력 이미지(10)를 크기 정보(20)에 따라 변환 이미지(30)로 이미지의 크기를 변환하는 장치로써, 컴퓨터, 서버 등으로 구현될 수 있다. The image scaling device 100 (hereinafter referred to as the scaling device 100) shown in FIG. 1 is a device that converts the size of the input image 10 into a converted image 30 according to size information 20. As such, it can be implemented with a computer, server, etc.
본 발명의 일 실시예에 따르면, 입력 이미지(10)는 형식에 제한이 없으며, 정적 이미지뿐 아니라 동적 이미지를 포함할 수 있다. 동적 이미지인 경우 프레임 별로 크기 변환이 적용될 수 있다.According to an embodiment of the present invention, the input image 10 is not limited in format and may include dynamic images as well as static images. For dynamic images, size conversion may be applied on a frame-by-frame basis.
본 발명의 일 실시예에 따르면, 크기 정보(20)는 입력 이미지(10)의 크기에 대한 정보 및 변환하고자 하는 크기(이하, 변환 크기라 한다.)에 대한 정보를 포함할 수 있다. According to one embodiment of the present invention, the size information 20 may include information about the size of the input image 10 and information about the size to be converted (hereinafter referred to as conversion size).
스케일링 장치(100)는 입력 이미지(10)의 크기보다 변환 크기를 비교하여 이미지(10)를 확대하는 업 스케일링과 축소하는 다운 스케일링을 수행할 수 있다. The scaling device 100 may perform upscaling to enlarge the image 10 and downscaling to reduce the image 10 by comparing the transformation size with the size of the input image 10.
입력 이미지(10)의 크기에 대한 정보는 입력 이미지의 너비(width) 및 높이(height)를 포함하고, 변환 크기에 대한 정보는 변환 이미지의 너비 및 높이를 포함할 수 있다. 다만, 입력 이미지(10)의 크기에 대한 정보는 스케일링 장치(100)가 수신한 입력 이미지(10)로부터 식별할 수 있다. Information about the size of the input image 10 may include the width and height of the input image, and information about the converted size may include the width and height of the converted image. However, information about the size of the input image 10 can be identified from the input image 10 received by the scaling device 100.
본 발명의 일 실시예에 따르면, 변환 이미지(30)는 스케일링 장치(100)가 출력하는 이미지 데이터이다.According to one embodiment of the present invention, the converted image 30 is image data output by the scaling device 100.
종래 입력 이미지의 크기를 변환하는 기술의 경우, 변환 프로그램 내 정해진 배수 혹은 1/2 배, 1/4 배와 같이 크기 변환이 용이한 배수에 대해서만 변환이 가능하였다.In the case of conventional technology for converting the size of an input image, conversion was possible only for multiples that were set in the conversion program or multiples that were easy to convert in size, such as 1/2 times or 1/4 times.
그러나, 입력 이미지(10)의 크기와 변환 크기를 비교하여 보면 변환하고자 하는 배수(이하, 변환 배수라 한다.)가 딱 떨어지지 않는 경우가 대부분이다.However, when comparing the size of the input image 10 and the conversion size, in most cases, the multiple to be converted (hereinafter referred to as the conversion multiple) is not exactly the same.
본 발명은 하드웨어 설계를 기반으로 하여 소프트웨어 프로그래밍보다 처리 속도가 빠르면서도, 변환 배수의 자유도가 높은 스케일링 장치(100)를 제안한다. The present invention proposes a scaling device 100 based on hardware design that has faster processing speed than software programming and has a high degree of freedom in conversion multiples.
이하, 도면들을 참조하여 본 발명의 일 실시예에 따른 스케일링 장치(100)의 구성 및 동작에 대해 보다 구체적으로 설명한다. Hereinafter, the configuration and operation of the scaling device 100 according to an embodiment of the present invention will be described in more detail with reference to the drawings.
도 2는 본 발명의 일 실시예에 따른 이미지 스케일링 장치의 구성을 도시한 블럭도이다.Figure 2 is a block diagram showing the configuration of an image scaling device according to an embodiment of the present invention.
본 발명의 일 실시예에 따른 스케일링 장치(100)은 입력부(110), 통신부(120), 표시부(130), 메모리(140) 및 프로세서(150)를 포함한다.The scaling device 100 according to an embodiment of the present invention includes an input unit 110, a communication unit 120, a display unit 130, a memory 140, and a processor 150.
입력부(110)는 스케일링 장치(100)의 사용자 입력에 대응하여 입력데이터를 발생시킨다. 예를 들어, 변환 크기에 관한 사용자 입력 등 이미지 스케일링을 수행하기 위한 사용자 입력인 경우 제한하지 않고 적용 가능하다. The input unit 110 generates input data in response to user input of the scaling device 100. For example, in the case of user input for performing image scaling, such as user input regarding the conversion size, it can be applied without limitation.
입력부(110)는 적어도 하나의 입력수단을 포함한다. 입력부(110)는 키보드(key board), 키패드(key pad), 돔 스위치(dome switch), 터치패널(touch panel), 터치 키(touch key), 마우스(mouse), 메뉴 버튼(menu button) 등을 포함할 수 있다.The input unit 110 includes at least one input means. The input unit 110 includes a keyboard, key pad, dome switch, touch panel, touch key, mouse, menu button, etc. may include.
통신부(120)는 입력 이미지, 입력 이미지의 크기에 대한 정보 및 변환 크기에 대한 정보를 수신하고, 변환 이미지를 전송하기 위해 AI 학습기, 서버 등 외부장치와의 통신을 수행한다. 이를 위해, 통신부(120)는 5G(5th generation communication), LTE-A(long term evolution-advanced), LTE(long term evolution), Wi-Fi(wireless fidelity) 등의 통신을 수행할 수 있다. The communication unit 120 receives the input image, information about the size of the input image, and information about the conversion size, and performs communication with external devices such as an AI learner and a server to transmit the converted image. To this end, the communication unit 120 may perform communications such as 5th generation communication (5G), long term evolution-advanced (LTE-A), long term evolution (LTE), and wireless fidelity (Wi-Fi).
한편, 통신부(120)는 입력 이미지, 입력 이미지의 크기에 대한 정보 및 변환 크기에 대한 정보를 수신할 수 있는 케이블이 연결될 수 있는 커넥터 또는 포트를 포함한다. 커네터 또는 포트는 USB 포트, HDMI 포트, DisplayPort, DVI 포트, SCART 등을 포함할 수 있다. 통신부(120)는 이더넷 등과 같은 네트워크 전송표준에 따른 커넥터 또는 포트를 포함할 수 있다. 예컨대, 통신부(120)는 라우터 또는 게이트웨이에 유선 접속된 랜카드 등으로 구현될 수 있다.Meanwhile, the communication unit 120 includes a connector or port to which a cable capable of receiving the input image, information about the size of the input image, and information about the conversion size can be connected. Connectors or ports may include USB ports, HDMI ports, DisplayPort, DVI ports, SCART, etc. The communication unit 120 may include a connector or port according to a network transmission standard such as Ethernet. For example, the communication unit 120 may be implemented as a LAN card wired to a router or gateway.
표시부(130)는 스케일링 장치(100)의 동작에 따른 표시 데이터를 표시한다. 표시부(130)는, 예를 들어, 입력 이미지를 포함하는 화면, 변환 크기를 입력하는 화면, 생성된 변환 이미지를 포함하는 화면 등을 표시할 수 있다.The display unit 130 displays display data according to the operation of the scaling device 100. For example, the display unit 130 may display a screen including an input image, a screen for inputting a conversion size, a screen including a generated converted image, etc.
표시부(130)는 액정 디스플레이(LCD; liquid crystal display), 발광 다이오드(LED; light emitting diode) 디스플레이, 유기 발광 다이오드(OLED; organic LED) 디스플레이, 마이크로 전자기계 시스템(MEMS; micro electro mechanical systems) 디스플레이 및 전자 종이(electronic paper) 디스플레이를 포함한다. 표시부(130)는 입력부(110)와 결합되어 터치 스크린(touch screen)으로 구현될 수 있다.The display unit 130 includes a liquid crystal display (LCD), a light emitting diode (LED) display, an organic light emitting diode (OLED) display, and a micro electro mechanical systems (MEMS) display. and electronic paper displays. The display unit 130 may be combined with the input unit 110 and implemented as a touch screen.
메모리(140)는 스케일링 장치(100)의 동작 프로그램들을 저장한다. 메모리(140)는 전원의 제공 유무와 무관하게 데이터(정보)를 보존할 수 있는 비휘발성 속성의 스토리지(storage)와, 프로세서(150)에 의해 처리되기 위한 데이터가 로딩되며 전원이 제공되지 않으면 데이터를 보존할 수 없는 휘발성 속성의 메모리(memory)를 포함한다. 스토리지에는 플래시메모리(flash-memory), HDD(hard-disc drive), SSD(solid-state drive) ROM(Read Only Memory) 등이 있으며, 메모리에는 버퍼(buffer), 램(RAM; Random Access Memory) 등이 있다.The memory 140 stores operation programs of the scaling device 100. The memory 140 is a non-volatile storage that can preserve data (information) regardless of whether power is provided, and data to be processed by the processor 150 is loaded. If power is not provided, the data is stored. Includes memory with volatile properties that cannot be preserved. Storage includes flash memory, HDD (hard-disc drive), SSD (solid-state drive), ROM (Read Only Memory), etc., and memory includes buffer and RAM (Random Access Memory). etc.
본 발명의 일 실시예에 따르면, 2 이상의 메모리를 포함할 수 있다. 이때, 2 이상의 메모리는 이미지의 너비 방향의 라인 혹은 높이 방향의 라인 별로 정보를 저장하되, 라인의 개수가 메모리의 개수보다 많은 경우, 메모리를 링 버퍼와 같이 사용하여 정보를 순차적으로 저장할 수 있다. According to one embodiment of the present invention, it may include two or more memories. At this time, two or more memories store information for each line in the width direction or height direction of the image, but if the number of lines is greater than the number of memories, the memory can be used like a ring buffer to sequentially store information.
메모리(140)는 너비 혹은 높이에 대응하는 변환 배수 중 어느 하나에 따라 입력 이미지의 복수의 픽셀을 복수의 그룹으로 나눈 경우, 복수의 그룹에 대한 정보를 저장하거나, 이미지 스케일링을 수행하는 과정에서 필요한 연산 프로그램 등을 저장할 수 있다. When a plurality of pixels of an input image are divided into a plurality of groups according to one of the conversion multipliers corresponding to width or height, the memory 140 stores information about the plurality of groups or is necessary in the process of performing image scaling. Calculation programs, etc. can be stored.
프로세서(150)는 프로그램 등 소프트웨어를 실행하여 스케일링 장치(100)의 적어도 하나의 다른 구성요소(예: 하드웨어 또는 소프트웨어 구성요소)를 제어할 수 있고, 다양한 데이터 처리 또는 연산을 수행할 수 있다. The processor 150 may control at least one other component (eg, hardware or software component) of the scaling device 100 by executing software such as a program, and may perform various data processing or calculations.
프로세서(150)는 나눗셈 설계 블록(151) 및 고정 소수점 설계 블록(152)을 포함할 수 있다. 이때, 나눗셈 설계 블록(151)과 고정 소수점 설계 블록(152)은 상호 전기적으로 접속된 회로로 구성될 수 있다. The processor 150 may include a division design block 151 and a fixed point design block 152. At this time, the division design block 151 and the fixed point design block 152 may be configured as circuits electrically connected to each other.
본 발명의 일 실시예에 따르면, 나눗셈 설계 블록(151)과 고정 소수점 설계 블록(152)을 이용하여 변환 배수를 식별할 수 있다. 본 발명의 일 실시예에 따른 변환 배수는 입력 이미지의 너비에 대응하는 변환 배수(이하, 제1변환 배수라 한다.)와 입력 이미지의 높이에 대응하는 변환 배수(이하, 제2변환 배수라 한다.)를 포함한다. 이때, 변환 배수는 정수값과 소수값으로 이루어진다. According to one embodiment of the present invention, the conversion multiple can be identified using the division design block 151 and the fixed point design block 152. The transformation multiplier according to an embodiment of the present invention is a transformation multiplier corresponding to the width of the input image (hereinafter referred to as the first transformation multiplier) and a transformation multiplier corresponding to the height of the input image (hereinafter referred to as the second transformation multiplier). .) includes. At this time, the conversion multiple consists of an integer value and a decimal value.
나눗셈 설계 블록(151)은 입력 이미지(10)의 크기 및 변환 크기를 나누어 몫과 나머지를 획득하고, 획득한 몫을 변환 배수의 정수값으로 식별한다. The division design block 151 divides the size and transformation size of the input image 10 to obtain a quotient and a remainder, and identifies the obtained quotient as an integer value of the transformation multiple.
이때, 소수값은 유한 소수로 나올 수 있지만 무한 소수로도 나올 수 있다. At this time, the decimal value may appear as a finite decimal number, but it may also appear as an infinite decimal number.
예를 들어, 입력 이미지의 너비가 10 픽셀이고, 변환 크기의 너비는 4 픽셀인 경우, 변환 배수의 정수값은 2, 소수값은 0.5로 변환 배수는 1/2.5배이다. For example, if the width of the input image is 10 pixels and the width of the conversion size is 4 pixels, the integer value of the conversion multiplier is 2, the decimal value is 0.5, and the conversion multiple is 1/2.5 times.
반면, 입력 이미지의 너비는 13 픽셀이고, 변환 크기의 너비는 7 픽셀인 경우, 변환 배수의 정수값은 1이고, 소수값은 0.85714285...로 무한대로 나올 수 있다. 또한, 본 발명에서 소수값은 회로상으로는 2진수로 표현되어야 한다. On the other hand, if the width of the input image is 13 pixels and the width of the conversion size is 7 pixels, the integer value of the conversion multiplier is 1, and the decimal value is 0.85714285... which can be infinite. Additionally, in the present invention, decimal values must be expressed as binary numbers in a circuit.
따라서, 스케일링 장치(100)는 변환 배수의 소수값을 2진수의 비트 단위로 표현하도록 설계된 고정 소수점 설계 블록(152)을 사용한다. Accordingly, the scaling device 100 uses a fixed-point design block 152 designed to express the decimal value of the conversion multiple in binary bit units.
고정 소수점 설계 블록(152)은 나눗셈 설계 블록(151)이 식별한 나머지 및 변환 크기를 이용하여 제1변환 배수 및 제2변환 배수의 소수값을 식별할 수 있다.The fixed point design block 152 may identify decimal values of the first and second conversion multiples using the remainder and conversion size identified by the division design block 151.
프로세서(150)는 입력 이미지, 입력 이미지의 크기에 대한 정보 및 변환 크기에 대한 정보를 수신하고, 입력 이미지의 크기 및 변환 크기에 기초하여 너비에 대응하는 제1변환 배수 및 높이에 대응하는 제2변환 배수를 식별하고, 제1변환 배수 및 제2변환 배수 중 어느 하나에 기초하여 입력 이미지의 복수의 픽셀을 제1복수의 그룹으로 나누어 순차적으로 제1복수의 그룹에 대한 정보를 2 이상의 메모리에 저장하고, 제1변환 배수 및 제2변환 배수 중 나머지 하나에 기초하여 제1복수의 그룹을 제2복수의 그룹으로 묶은 후, 제2복수의 그룹 각각에 포함된 픽셀의 평균값을 식별하여 변환 이미지를 생성한다.The processor 150 receives an input image, information about the size of the input image, and information about the transformation size, and based on the size of the input image and the transformation size, a first transformation multiple corresponding to the width and a second transformation multiple corresponding to the height. Identify the transformation multiplier, divide the plurality of pixels of the input image into first plurality groups based on either the first transformation multiplier or the second transformation multiplier, and sequentially store information about the first plurality groups in two or more memories. After storing the first plurality of groups into the second plurality of groups based on the remaining one of the first transformation multiplier and the second transformation multiplier, the average value of the pixels included in each of the second plurality of groups is identified to create a converted image. creates .
도 3은 본 발명의 일 실시예에 따른 이미지 스케일링 장치의 동작 흐름도를 도시한 도면이다.Figure 3 is a diagram illustrating an operation flowchart of an image scaling device according to an embodiment of the present invention.
본 발명의 일 실시예에 따르면, 프로세서(150)는 입력 이미지(10), 입력 이미지(10)의 크기에 대한 정보 및 변환 크기에 대한 정보를 수신한다(S10).According to one embodiment of the present invention, the processor 150 receives the input image 10, information about the size of the input image 10, and information about the conversion size (S10).
앞서 서술한 바와 같이, 입력 이미지(10)는 외부로부터 수신할 수 있으며, 다만 이에 한정되지 않고 메모리(140)에 기 저장되어 이용될 수 있다. 프로세서(150)는 입력 이미지(10)로부터 입력 이미지(10)의 크기에 대한 정보를 식별할 수 있으며, 입력부(110)를 통해 입력 이미지(10)의 크기나 변환 크기에 대한 사용자 입력을 수신하거나, 변환 크기에 대한 정보를 외부로부터 수신할 수 있다. 이와 같이, 입력 이미지(10)나 입력 이미지(10)의 크기에 대한 정보, 변환 크기에 대한 정보의 수신 경로는 다양하게 존재하며, 수신 경로나 방식에 의해 본 발명이 한정되지 않는다.As described above, the input image 10 can be received from the outside, but is not limited to this and can be pre-stored in the memory 140 and used. The processor 150 may identify information about the size of the input image 10 from the input image 10, and receive user input about the size or conversion size of the input image 10 through the input unit 110. , information about the conversion size can be received from the outside. As such, there are various reception paths for the input image 10, information about the size of the input image 10, and information about the conversion size, and the present invention is not limited by the reception path or method.
본 발명의 일 실시예에 따르면, 프로세서(150)는 입력 이미지의 크기 및 변환 크기에 기초하여 너비에 대응하는 제1변환 배수 및 높이에 대응하는 제2변환 배수를 식별한다(S20).According to one embodiment of the present invention, the processor 150 identifies a first transform multiplier corresponding to the width and a second transform multiplier corresponding to the height based on the size and transform size of the input image (S20).
본 발명의 일 실시예에 따르면, 프로세서(150)는 나눗셈 설계 블록(151)과 고정 소수점 설계 블록(152)을 포함하고, 나눗셈 설계 블록(151)과 고정 소수점 설계 블록(152)을 이용하여 변환 배수를 식별할 수 있다. According to one embodiment of the present invention, the processor 150 includes a division design block 151 and a fixed point design block 152, and conversion is performed using the division design block 151 and the fixed point design block 152. Multiples can be identified.
보다 구체적으로, 나눗셈 설계 블록(151)은 입력 이미지(10)의 너비와 변환 크기의 너비를 나누어 몫과 나머지를 획득하고, 몫을 제1변환 배수의 정수값으로 식별할 수 있다. 마찬가지로, 나눗셈 설계 블록(151)은 입력 이미지(10)의 높이와 변환 크기의 높이를 나누어 몫과 나머지를 획득하고, 몫을 제2변환 배수의 정수값으로 식별할 수 있다.More specifically, the division design block 151 may obtain a quotient and a remainder by dividing the width of the input image 10 and the width of the transformation size, and identify the quotient as an integer value of the first transformation multiple. Likewise, the division design block 151 may obtain a quotient and a remainder by dividing the height of the input image 10 and the height of the transformation size, and identify the quotient as an integer value of the second transformation multiple.
고정 소수점 설계 블록(152)은 나눗셈 설계 블록(151)이 식별한 나머지 및 변환 크기를 이용하여 변환 배수의 소수값을 식별한다. 이때, 고정 소수점 설계 블록(152)은 나눗셈 설계 블록(151)으로부터 나머지 정보를 수신할 수 있다. The fixed point design block 152 uses the remainder and the transform size identified by the division design block 151 to identify the decimal value of the transform multiple. At this time, the fixed point design block 152 may receive the remaining information from the division design block 151.
고정 소수점 설계 블록(152)의 구체적인 동작 과정은 도 4를 참조하여 설명한다.The specific operation process of the fixed-point design block 152 will be described with reference to FIG. 4.
본 발명의 일 실시예에 따르면, 프로세서(150)는 제1변환 배수 및 제2변환 배수 중 어느 하나에 기초하여 입력 이미지의 복수의 픽셀을 제1복수의 그룹으로 나누어 순차적으로 제1복수의 그룹에 대한 정보를 2 이상의 메모리에 저장한다(S30).According to an embodiment of the present invention, the processor 150 divides a plurality of pixels of the input image into a first plurality of groups based on either a first transform multiplier or a second transform multiplier and sequentially divides the plurality of pixels into the first plurality groups. Information about is stored in two or more memories (S30).
스케일링의 과정은 너비 방향과 높이 방향 각각의 축소/확대로 이루어진다. 이때, 너비 방향과 높이 방향의 스케일링 순서는 최종 결과물에 영향을 주지 않는다. The scaling process consists of reduction/enlargement in the width and height directions, respectively. At this time, the scaling order in the width and height directions does not affect the final result.
예를 들어, 제1변환 배수가 1/2.5이고, 제2변환 배수가 1/4.5인 경우, 너비 방향으로 먼저 1/2.5배 축소 후 높이 방향으로 1/4.5배 축소하여 얻은 변환 이미지와, 먼저 높이 방향으로 1/4.5배 축소 후 너비 방향으로 1/2.5배 축소하여 얻은 변환 이미지는 같다.For example, if the first conversion multiple is 1/2.5 and the second conversion multiple is 1/4.5, the converted image obtained by first reducing it by 1/2.5 times in the width direction and then reducing it by 1/4.5 times in the height direction, and The converted image obtained by reducing the image by 1/4.5 times in the height direction and then reducing it by 1/2.5 times in the width direction is the same.
따라서, 프로세서(150)는 너비 방향 혹은 높이 방향 중 먼저 스케일링하는 방향의 변환 배수에 따라 입력 이미지의 복수의 픽셀을 제1복수의 그룹으로 나눌 수 있다. Accordingly, the processor 150 may divide a plurality of pixels of the input image into a first plurality of groups according to a conversion multiplier in the width direction or the height direction, whichever scales first.
어느 하나의 변환 배수가 제1변환 배수인 경우, 즉 너비 방향으로 먼저 스케일링을 수행하는 경우, 프로세서(150)는 입력 이미지를 이루는 복수의 픽셀 중 너비 방향의 라인 별 포함된 픽셀들을 제1변환 배수에 맞게 그루핑(grouping)하여 제1복수의 그룹을 생성할 수 있다. When one of the transformation multipliers is the first transformation multiplier, that is, when scaling is performed in the width direction first, the processor 150 selects the pixels included for each line in the width direction among the plurality of pixels forming the input image to the first transformation multiplier. A first plurality of groups can be created by grouping accordingly.
반대로, 어느 하나의 변환 배수가 제2변환 배수인 경우, 즉 높이 방향으로 먼저 스케일링을 수행하는 경우, 프로세서(150)는 입력 이미지를 이루는 복수의 픽셀 중 높이 방향의 라인 별 포함된 픽셀들을 제2변환 배수에 맞게 그루핑하여 제1복수의 그룹을 생성할 수 있다. 그루핑을 수행하는 구체적인 예시는 도 5를 참조하여 설명한다.On the contrary, when one transformation multiplier is a second transformation multiplier, that is, when scaling is performed in the height direction first, the processor 150 divides the pixels included for each line in the height direction among the plurality of pixels constituting the input image into a second transformation multiplier. A first plurality of groups can be created by grouping according to the conversion multiple. A specific example of performing grouping will be described with reference to FIG. 5.
그리고, 프로세서(150)는 제1복수의 그룹에 대한 정보를 순차적으로 2 이상의 메모리에 저장할 수 있다. 이때, 제1복수의 그룹에 대한 정보는, 각 그룹에 포함된 픽셀의 수와 각 그룹에 포함된 픽셀의 픽셀값의 합의 정보를 포함한다. 메모리에 저장하는 과정은 도 6을 참조하여 구체적으로 설명한다. Additionally, the processor 150 may sequentially store information about the first plurality of groups in two or more memories. At this time, the information about the first plurality of groups includes information about the sum of the number of pixels included in each group and the pixel values of the pixels included in each group. The process of storing in memory will be described in detail with reference to FIG. 6.
본 발명의 일 실시예에 따르면, 프로세서(150)는 제1변환 배수 및 제2변환 배수 중 나머지 하나에 기초하여 제1복수의 그룹을 제2복수의 그룹으로 묶은 후, 제2복수의 그룹 각각에 포함된 픽셀의 평균값을 식별하여 변환 이미지(30)를 생성한다(S40).According to an embodiment of the present invention, the processor 150 groups the first plurality of groups into a second plurality of groups based on the remaining one of the first transformation multiplier and the second transformation multiplier, and then groups each of the second plurality groups. The converted image 30 is generated by identifying the average value of the pixels included in (S40).
본 발명의 일 실시예에 따르면, 프로세서(150)는 나머지 하나의 변환 배수의 정수값에 대응하는 라인 개수만큼 제1복수의 그룹에 대한 정보를 순차적으로 읽어오면서 제1복수의 그룹을 제2복수의 그룹으로 묶을 수 있다. According to an embodiment of the present invention, the processor 150 sequentially reads information about the first plurality of groups as many lines as the number of lines corresponding to the integer value of the remaining conversion multiple, and converts the first plurality of groups into the second plurality of groups. Can be grouped into groups.
예를 들어, 프로세서(150)는 제1복수의 그룹이 제1변환 배수에 의해 생성된 경우, 제2변환 배수의 정수값에 대응하는 라인 개수만큼 제1복수의 그룹에 대한 정보를 순차적으로 읽는다. For example, when the first plurality of groups are created by the first transformation multiplier, the processor 150 sequentially reads information about the first plurality of groups as many lines as the number of lines corresponding to the integer value of the second transformation multiplier. .
이때, 프로세서(150)는 읽어오다가 변환 배수의 소수값의 합이 1씩 초과할 때 마다 정수값에 대응하는 라인 개수보다 하나 더 읽어 제2복수의 그룹을 생성한다.At this time, the processor 150 generates a second plurality of groups by reading one more line than the number of lines corresponding to the integer value each time the sum of the decimal values of the conversion multiples exceeds 1 while reading.
변환 이미지(30)는 결국 다운 스케일링의 경우 복수의 픽셀을 하나의 픽셀로 축소하는 과정을 연속적으로 수행하여 생성되는 바, 프로세서(150)는 제2복수의 그룹별로 각 그룹에 포함된 픽셀의 평균값을 식별하여 변환 이미지(30)를 생성할 수 있다.The converted image 30 is ultimately created by continuously performing the process of reducing a plurality of pixels to one pixel in the case of downscaling, and the processor 150 determines the average value of the pixels included in each group for each of the second plurality of groups. The converted image 30 can be generated by identifying .
본 발명의 일 실시예에 따르면, 하드웨어 구성을 통해 보다 빠르고, 변환 배수의 제약이 적은 스케일링을 수행할 수 있다. According to an embodiment of the present invention, scaling can be performed faster and with fewer constraints on conversion multiples through a hardware configuration.
본 발명의 일 실시예에 따르면, 변환 배수를 자유롭게 구성할 수 있으므로 AI 학습 등 변환 이미지 활용성이 높아질 수 있다. 특히, AI 가속기에 이용되는 경우, 학습 성능을 높일 수 있다.According to an embodiment of the present invention, the conversion multiplier can be freely configured, so the usability of the conversion image, such as for AI learning, can be increased. In particular, when used in an AI accelerator, learning performance can be improved.
도 4는 본 발명의 일 실시예에 따른 이미지 스케일링 장치의 변환 배수를 식별하는 동작 흐름도를 도시한 도면이다.FIG. 4 is a diagram illustrating an operation flowchart for identifying a conversion multiplier of an image scaling device according to an embodiment of the present invention.
도 4는 도 3의 S20과 관련하여 변환 배수를 식별하는 고정 소수점 설계 블록(152)의 동작 흐름도를 나타낸다. 이하, 설명의 편의를 위해, 입력 이미지(10)는 9 픽셀*13 픽셀의 크기를 가지고, 변환 크기는 2 픽셀*7 픽셀의 크기를 가진다고 가정하고, 입력 이미지(10)의 높이에 대응하는 제2변환 배수의 소수값을 구하는 과정을 설명한다. 이때, 소수값은 앞서 서술한 바와 같이 비트 단위로 식별한다. FIG. 4 shows an operational flow diagram of the fixed point design block 152 identifying a conversion multiple in relation to S20 of FIG. 3. Hereinafter, for convenience of explanation, it is assumed that the input image 10 has a size of 9 pixels * 13 pixels, and the conversion size has a size of 2 pixels * 7 pixels, and the first image corresponding to the height of the input image 10 is assumed to be 2 pixels * 7 pixels. 2Describes the process of calculating the decimal value of a conversion multiple. At this time, the decimal value is identified in bit units as described above.
본 발명의 일 실시예에 따르면, 고정 소수점 설계 블록(152)은 나눗셈 설계 블록(151)으로부터 나머지에 관한 정보를 수신하고, 변환 크기의 정보를 수신한다(S21). 이때, 13을 7로 나누면 몫은 1이고, 나머지는 6이다. 대응하는 변환 크기는 7이다. According to one embodiment of the present invention, the fixed-point design block 152 receives information about the remainder from the division design block 151 and receives information about the transform size (S21). At this time, when 13 is divided by 7, the quotient is 1 and the remainder is 6. The corresponding transformation size is 7.
고정 소수점 설계 블록(152)은 변환 크기가 나머지의 2배보다 작은지 여부를 식별한다(S22). 7은 6의 2배인 12보다 작다(S22의 Yes).The fixed point design block 152 identifies whether the transform size is less than twice the remainder (S22). 7 is less than 12, which is twice 6 (Yes in S22).
고정 소수점 설계 블록(152)은 변환 크기가 나머지의 2배보다 작은 경우(S22의 Yes), 소수값의 최상 비트(bit)값을 1로 지정하고, (나머지*2-변환 크기)를 출력한다(S23). 본 발명의 일 실시예에 따르면, 소수값을 8비트로 나타낼 것이다. 이때, 최상 비트값은 8비트 중 첫번째 비트값을 의미한다. If the conversion size is less than 2 times the remainder (Yes in S22), the fixed point design block 152 specifies the highest bit value of the decimal value as 1 and outputs (remainder * 2 - conversion size). (S23). According to one embodiment of the present invention, decimal values will be represented by 8 bits. At this time, the highest bit value means the first bit value among 8 bits.
고정 소수점 설계 블록(152)은 변환 크기가 나머지의 2배보다 작지 않은 경우(S22의 No), 소수값의 최상 비트값을 0으로 지정하고, 나머지를 2배하여 출력한다(S24).If the conversion size is not less than twice the remainder (No in S22), the fixed-point design block 152 sets the highest bit value of the decimal value to 0 and outputs the remainder doubled (S24).
이때, 7은 6의 2배인 12보다 작으므로(S22의 Yes), 최상 비트값은 1이고(1XXX_XXXX), 출력값은 (6*2-7)=5이다(S23).At this time, 7 is less than 12, which is twice 6 (Yes in S22), so the highest bit value is 1 (1XXX_XXXX), and the output value is (6*2-7)=5 (S23).
고정 소수점 설계 블록(152)은 변환 크기가 이전 출력값의 2배보다 작은지 여부를 식별한다(S25). 이하 이전 출력값은 각 단계 전에 고정 소수점 설계 블록(152)이 출력한 값을 의미한다. The fixed point design block 152 identifies whether the transform size is less than twice the previous output value (S25). Hereinafter, the previous output value refers to the value output by the fixed-point design block 152 before each step.
고정 소수점 설계 블록(152)은 변환 크기가 이전 출력값의 2배보다 작은 경우(S22의 Yes), 소수값의 다음 비트값을 1로 지정하고, (이전 출력값*2-변환 크기)를 출력한다(S26). If the conversion size is less than twice the previous output value (Yes in S22), the fixed point design block 152 sets the next bit value of the decimal value to 1 and outputs (previous output value * 2 - conversion size) ( S26).
고정 소수점 설계 블록(152)은 변환 크기가 이전 출력값의 2배보다 작지 않은 경우(S22의 No), 소수값의 다음 비트값을 0으로 지정하고, 이전 출력값을 2배하여 출력한다(S27).If the conversion size is not smaller than twice the previous output value (No in S22), the fixed point design block 152 sets the next bit value of the decimal value to 0 and outputs the previous output value by doubling it (S27).
이 경우, 이전 출력값은 5이고, 7은 5의 2배인 10보다 작으므로(S25의 Yes), 다음 비트값은 1이고(11XX_XXXX), 출력값은 (5*2-7)=3이다(S26).In this case, the previous output value is 5, and 7 is less than 10, which is twice 5 (Yes in S25), so the next bit value is 1 (11XX_XXXX), and the output value is (5*2-7)=3 (S26) .
고정 소수점 설계 블록(152)은 소수값에 대한 비트값이 8비트로 완성되었는지 여부를 확인하고(S28), 아직 완성되지 않은 경우(S28의 No) 다음 비트값을 식별하기 위해 S25 단계로 돌아간다.The fixed-point design block 152 checks whether the bit value for the decimal value has been completed with 8 bits (S28), and if not yet completed (No in S28), returns to step S25 to identify the next bit value.
완성된 경우(S28의 Yes), 8비트의 소수값을 출력한다(S29).When completed (Yes in S28), an 8-bit decimal value is output (S29).
예시는 아직 8비트가 아니므로(11XX_XXXX)(S28의 No), S25 단계로 돌아간다. Since the example is not yet 8 bits (11XX_XXXX) (No in S28), return to step S25.
S25에서, 7은 3의 2배인 6보다 크므로(S25의 No), 다음 비트값은 0이고(110X_XXXX), 출력값은 (3*2)=6이다(S27). In S25, 7 is greater than 6, which is twice 3 (No in S25), so the next bit value is 0 (110X_XXXX), and the output value is (3*2)=6 (S27).
8비트가 아니므로(S28의 No), S25 단계로 돌아간다. Since it is not 8 bits (No in S28), return to step S25.
S25에서, 7은 6의 2배인 12보다 작으므로(S25의 Yes), 다음 비트값은 1이고(1101_XXXX), 출력값은 (6*2-7)=5이다(S26).In S25, 7 is less than 12, which is twice 6 (Yes in S25), so the next bit value is 1 (1101_XXXX), and the output value is (6*2-7)=5 (S26).
8비트가 아니므로(S28의 No), S25 단계로 돌아간다. Since it is not 8 bits (No in S28), return to step S25.
S25에서, 7은 5의 2배인 10보다 작으므로(S25의 Yes), 다음 비트값은 1이고(1101_1XXX), 출력값은 (5*2-7)=3이다(S26).In S25, 7 is less than 10, which is twice 5 (Yes in S25), so the next bit value is 1 (1101_1XXX), and the output value is (5*2-7)=3 (S26).
8비트가 아니므로(S28의 No), S25 단계로 돌아간다. Since it is not 8 bits (No in S28), return to step S25.
S25에서, 7은 3의 2배인 6보다 크므로(S25의 No), 다음 비트값은 0이고(1101_10XX), 출력값은 (3*2)=6이다(S27). In S25, 7 is greater than 6, which is twice 3 (No in S25), so the next bit value is 0 (1101_10XX), and the output value is (3*2)=6 (S27).
8비트가 아니므로(S28의 No), S25 단계로 돌아간다. Since it is not 8 bits (No in S28), return to step S25.
S25에서, 7은 6의 2배인 12보다 작으므로(S25의 Yes), 다음 비트값은 1이고(1101_101X), 출력값은 (6*2-7)=5이다(S26).In S25, 7 is less than 12, which is twice 6 (Yes in S25), so the next bit value is 1 (1101_101X), and the output value is (6*2-7)=5 (S26).
8비트가 아니므로(S28의 No), S25 단계로 돌아간다. Since it is not 8 bits (No in S28), return to step S25.
S25에서, 7은 5의 2배인 10보다 작으므로(S25의 Yes), 다음 비트값은 1이고(1101_1011), 출력값은 (5*2-7)=3이다(S26).In S25, 7 is less than 10, which is twice 5 (Yes in S25), so the next bit value is 1 (1101_1011), and the output value is (5*2-7)=3 (S26).
고정 소수점 설계 블록(152)은 1101_1011로 8비트가 완성되었으므로(S28의 Yes), 8비트를 소수값으로 출력한다(S29).Since 8 bits of the fixed point design block 152 are completed as 1101_1011 (Yes in S28), the 8 bits are output as a decimal value (S29).
즉, 입력 이미지(10)는 높이 13 픽셀을 높이 7 픽셀로 변환하는 경우, 제2변환 배수의 정수값은 1이고, 소수값은 2진수로 0.11011011(2)로 나타낼 수 있다.That is, when the input image 10 is converted from a height of 13 pixels to a height of 7 pixels, the integer value of the second conversion multiple is 1, and the decimal value can be expressed as 0.11011011(2) in binary.
0.11011011(2)을 10진수값으로 변환하면, 0.85546875(10)이다. 이때, 13을 7로 나누면, 0.85714285...(10) 인바, 오차가 매우 작다.Converting 0.11011011(2) to decimal value, it is 0.85546875(10). At this time, if you divide 13 by 7, you get 0.85714285...(10) Invar, the error is very small.
도 5는 본 발명의 일 실시예에 따른 이미지 스케일링 장치의 다운 스케일링 동작 모습을 도시한 도면이다.Figure 5 is a diagram showing a downscaling operation of an image scaling device according to an embodiment of the present invention.
도 5는 도 3의 S30 및 S40을 참조하여 입력 이미지의 복수의 픽셀을 제1복수의 그룹 및 제2복수의 그룹으로 나누는 부분에 대해서 자세히 설명한다. FIG. 5 provides a detailed explanation of dividing a plurality of pixels of an input image into a first plurality of groups and a second plurality of groups with reference to S30 and S40 of FIG. 3 .
이때, 예시는 앞서 도 4와 동일하게 입력 이미지(10)는 9 픽셀*13 픽셀의 크기를 가지고, 변환 크기는 2 픽셀*7 픽셀의 크기를 가지고, 제1변환 배수에 기초하여 먼저 스케일링 한다고 가정한다.At this time, the example assumes that, as in FIG. 4, the input image 10 has a size of 9 pixels*13 pixels, the transformation size has a size of 2 pixels*7 pixels, and scaling is performed first based on the first transformation multiple. do.
앞서 도 4에서 식별한 바와 같이, 너비 방향의 제1변환 배수는 1/4.5이다. As previously identified in FIG. 4, the first transformation multiple in the width direction is 1/4.5.
프로세서(150)는 제1변환 배수에 기초하여 입력 이미지(10)의 복수의 픽셀을 제1복수의 그룹으로 나눌 수 있다. The processor 150 may divide the plurality of pixels of the input image 10 into a first plurality of groups based on the first transformation multiplier.
프로세서(150)는 입력 이미지(10)를 이루는 복수의 픽셀 중 너비 방향의 라인 별 포함된 픽셀들을 제1변환 배수에 맞게 그루핑(grouping)하여 제1복수의 그룹을 생성할 수 있다. The processor 150 may generate a first plurality of groups by grouping pixels included in each line in the width direction among the plurality of pixels forming the input image 10 according to the first transformation multiplier.
도 5를 참조하면, 프로세서(150)는 입력 이미지(10)의 너비 방향의 라인 중 라인 1에 포함된 9개의 픽셀들을 제1변환 배수의 정수값이 4개만큼 하나의 그룹(11)으로 묶고, 나머지 5개 픽셀을 또 하나의 그룹(12)으로 묶을 수 있다. Referring to FIG. 5, the processor 150 groups the 9 pixels included in line 1 of the lines in the width direction of the input image 10 into one group 11 with the integer value of the first transform multiple being 4. , the remaining 5 pixels can be grouped into another group (12).
이때, 그룹(11)의 제1변환 배수의 소수값 0.5와 그룹(12)의 제1변환 배수의 소수값 0.5를 합치면 정수 1이 나오기 때문에, 그룹(12)는 제1변환 배수의 정수값 4보다 한 픽셀을 더 포함하는 5개의 픽셀로 이루어진다. At this time, since the integer 1 is obtained by combining the decimal value 0.5 of the first conversion multiple of group 11 and the decimal value 0.5 of the first conversion multiple of group 12, group 12 has the integer value 4 of the first conversion multiple. It consists of 5 pixels, including one more pixel.
이는 모든 라인에 대해서 동일하게 수행되므로, 너비 방향의 라인 1부터 라인 13까지 라인 별로 4픽셀, 5픽셀로 이루어진 26개의 그룹들로 이루어진다. 이들을 제1복수의 그룹이라 한다. Since this is performed equally for all lines, it consists of 26 groups of 4 pixels and 5 pixels for each line from line 1 to line 13 in the width direction. These are called the first plural group.
프로세서(150)는 각 그룹에 포함된 픽셀의 수와 각 그룹에 포함된 픽셀의 픽셀값의 합의 정보를 포함하는 제1복수의 그룹에 대한 정보를 메모리(140)에 저장한다.The processor 150 stores information about the first plurality of groups in the memory 140, including information on the sum of the number of pixels included in each group and the pixel values of the pixels included in each group.
본 발명의 일 실시예에 따르면, 픽셀값은 해당 픽셀의 밝기정보, 색정보 등을 포함할 수 있다. 예를 들어, 입력 이미지가 그레이 스케일을 가지는 경우, 픽셀값은 1 화소를 8 비트로 표현하여 0과 255 사이의 범위를 가질 수 있다. 블랙은 0, 화이트는 255의 픽셀값을 가진다.According to one embodiment of the present invention, the pixel value may include brightness information, color information, etc. of the corresponding pixel. For example, if the input image has a gray scale, the pixel value can range between 0 and 255 by expressing 1 pixel in 8 bits. Black has a pixel value of 0 and white has a pixel value of 255.
입력 이미지가 컬러인 경우, 픽셀값은 1 화소를 R(레드), G(그린), B(블루)의 각 색 성분마다 8 비트로 표현하여 각 색 성분에 대해 0과 255 사이의 범위를 가질 수 있다. 예를 들어 블랙은 (0, 0, 0), 화이트는 (255, 255, 255)의 픽셀값을 가진다. 예를 들어, 모든 픽셀들의 픽셀값이 10이라고 가정하면, 그룹(11)의 경우 픽셀 4개, 픽셀값을 모두 합한 40의 정보를 메모리에 저장한다. If the input image is color, the pixel value can range between 0 and 255 for each color component by expressing 1 pixel with 8 bits for each color component of R (red), G (green), and B (blue). there is. For example, black has a pixel value of (0, 0, 0), and white has a pixel value of (255, 255, 255). For example, assuming that the pixel value of all pixels is 10, in the case of group 11, information on 4 pixels and the total of 40 pixel values is stored in the memory.
만일, 프로세서(150)가 바로 스케일링을 수행하는 경우 너비 방향으로 축소된 이미지(510)를 생성할 수 있다. 이때, 그룹(11)은 픽셀(511)로, 그룹(12)은 픽셀(512)로 변환될 수 있다. 다만, 본 발명은 바로 스케일링 하지 않고, 제1복수의 그룹에 대한 정보들을 메모리(140)에 순차적으로 저장한다.If the processor 150 immediately performs scaling, the image 510 can be generated reduced in the width direction. At this time, group 11 can be converted into pixel 511 and group 12 can be converted into pixel 512. However, the present invention does not directly scale, but sequentially stores information about the first plurality of groups in the memory 140.
다음으로, 프로세서(150)는 나머지 하나의 제2변환 배수의 정수값에 대응하는 라인 개수만큼 제1복수의 그룹에 대한 정보를 순차적으로 읽어오면서 제1복수의 그룹을 제2복수의 그룹으로 묶을 수 있다. Next, the processor 150 sequentially reads information about the first plurality of groups as many lines as the number of lines corresponding to the integer value of the remaining second conversion multiple and groups the first plurality of groups into the second plurality of groups. You can.
도 4에서 식별한 바와 같이, 높이 방향의 제2변환 배수는 1/1.85546875이다. As identified in Figure 4, the second transformation multiplier in the height direction is 1/1.85546875.
프로세서(150)는 제2변환 배수의 정수값에 대응하는 라인 개수만큼 제1복수의 그룹에 대한 정보를 순차적으로 읽는다. 이때, 프로세서(150)는 읽어오다가 변환 배수의 소수값의 합이 1씩 초과할 때 마다 정수값에 대응하는 라인 개수보다 하나 더 읽어 제2복수의 그룹을 생성한다.The processor 150 sequentially reads information about the first plurality of groups as many lines as the number of lines corresponding to the integer value of the second conversion multiple. At this time, the processor 150 generates a second plurality of groups by reading one more line than the number of lines corresponding to the integer value each time the sum of the decimal values of the conversion multiples exceeds 1 while reading.
도 5를 참조하면, 프로세서(150)는 제2변환 배수의 정수값 1인 바, 그룹(11)을 읽어 그룹(31)으로 묶을 수 있다. Referring to FIG. 5, since the integer value of the second conversion multiple is 1, the processor 150 can read group 11 and group it into group 31.
다음은 그룹(11)의 소수값 0.85546875와 그룹(13)의 소수값 0.85546875을 합하면 1을 초과하므로(1.7109375), 정수값의 1보다 하나 추가한 2개의 그룹(13), 그룹(14)을 읽어 그룹(32)으로 묶을 수 있다. Next, the sum of the decimal value 0.85546875 of group (11) and the decimal value of group (13) 0.85546875 exceeds 1 (1.7109375), so read the two groups (13) and group (14) with one more than 1 of the integer value. It can be grouped into groups (32).
다음은 앞서 소수값 1.7109375에 그룹(14)의 소수값 0.85546875을 합하면 또 1을 초과하므로(2.56640625), 정수값의 1보다 하나 추가한 2개의 그룹(15), 그룹(16)을 읽어 그룹(33)으로 묶을 수 있다. Next, adding the decimal value 0.85546875 of group (14) to the previous decimal value of 1.7109375 exceeds 1 (2.56640625), so two groups (15) and group (16) with one added more than 1 of the integer value are read to obtain group (33). ) can be tied.
이와 같이 묶으면, 26개의 제1복수의 그룹은 14개의 제2복수의 그룹으로 묶일 수 있다.If grouped in this way, the 26 first plural groups can be grouped into 14 second plural groups.
프로세서(150)는 제2복수의 그룹별로 각 그룹에 포함된 픽셀의 평균값을 식별하여 변환 이미지(30)를 생성할 수 있다.The processor 150 may generate the converted image 30 by identifying the average value of pixels included in each group for each of the second plurality of groups.
예를 들어, 그룹(31)은 4개의 픽셀, 40 픽셀값인 바, 픽셀의 평균값인 10의 픽셀값을 가진다. 그룹(32)은 8개의 픽셀, 80 픽셀값인 바, 픽셀의 평균값인 10의 픽셀값을 가진다. 그룹(33)은 8개의 픽셀, 80 픽셀값인 바, 픽셀의 평균값인 10의 픽셀값을 가진다.For example, group 31 has 4 pixels and 40 pixel values, and has a pixel value of 10, which is the average value of the pixels. Group 32 has 8 pixels and 80 pixel values, and has a pixel value of 10, which is the average value of the pixels. Group 33 has 8 pixels and 80 pixel values, and has a pixel value of 10, which is the average value of the pixels.
도 6은 본 발명의 일 실시예에 따른 이미지 스케일링 장치의 동작 모습을 도시한 도면이다.Figure 6 is a diagram showing the operation of an image scaling device according to an embodiment of the present invention.
도 6은 도 5를 참조하여 설명한 스케일링 과정을 메모리를 이용하여 수행하는 모습을 도시한다. FIG. 6 shows the scaling process described with reference to FIG. 5 being performed using memory.
본 발명의 일 실시예에 따르면, 스케일링 장치(100)는 2 이상의 메모리(140)를 가진다. 도 6을 참조하면 메모리(140)는 17개의 메모리로 구성된다. 이때, 메모리의 개수 및 구조는 본 도면에 의해 한정되지 않는다. According to one embodiment of the present invention, the scaling device 100 has two or more memories 140. Referring to FIG. 6, the memory 140 consists of 17 memories. At this time, the number and structure of memories are not limited by this drawing.
도 5의 예시를 그대로 이어가면, 프로세서(150)는 입력 이미지(10)를 이루는 복수의 픽셀 중 너비 방향의 라인 별 포함된 픽셀들을 제1변환 배수에 맞게 그루핑(grouping)하여 제1복수의 그룹을 생성할 수 있다. Continuing the example of FIG. 5, the processor 150 groups the pixels included in each line in the width direction among the plurality of pixels forming the input image 10 according to the first transformation multiplier to form a first plurality of groups. can be created.
프로세서(150)는 입력 이미지(10)의 너비 방향의 라인 중 각 라인에 포함된 9개의 픽셀들을 제1변환 배수의 정수값이 4개만큼 하나의 그룹으로 묶고, 나머지 5개 픽셀을 또 하나의 그룹으로 묶을 수 있다. The processor 150 groups 9 pixels included in each line among the lines in the width direction of the input image 10 into one group with an integer value of the first transformation multiple of 4, and groups the remaining 5 pixels into another group. Can be grouped.
이때, 프로세서(150)는 입력 이미지(10)의 너비 방향의 라인 별로 제1복수의 그룹에 대한 정보를 순차적으로 2 이상의 메모리(140)에 저장할 수 있다. At this time, the processor 150 may sequentially store information about the first plurality of groups in two or more memories 140 for each line in the width direction of the input image 10.
따라서, 프로세서(150)는 메모리 1에 라인 1을 구성하는 두 개의 그룹, 그룹(11), 그룹(12)에 대한 정보를 저장할 수 있고, 순차적으로 라인 별 그룹에 대한 정보를 저장할 수 있다. 도 6에 도시된 메모리는 17개이지만 13개의 라인으로 구성되는 바, 메모리 13까지 정보가 저장된다. 라인의 개수가 메모리 개수보다 많은 경우, 메모리는 링 버퍼와 같이 이용되어 다시 처음 메모리 순으로 저장될 수 있다. Accordingly, the processor 150 can store information about the two groups, group 11, and group 12 constituting line 1 in memory 1, and sequentially store information about the groups for each line. There are 17 memories shown in FIG. 6, but they are composed of 13 lines, so information is stored up to memory 13. If the number of lines is greater than the number of memories, the memory can be used like a ring buffer and stored in the first memory order again.
제1복수의 그룹에 대한 정보가 순차적으로 메모리(140)에 저장된 경우, 프로세서(150)는 제2변환 배수에 기초하여 메모리(140)로부터 제1복수의 그룹에 대한 정보를 순차적으로 읽어오면서 제1복수의 그룹을 제2복수의 그룹으로 묶을 수 있다. When the information about the first plurality of groups is sequentially stored in the memory 140, the processor 150 sequentially reads the information about the first plurality of groups from the memory 140 based on the second conversion multiplier and The first plurality of groups can be grouped into the second plurality of groups.
따라서, 도 5와 관련하여 설명한 바와 같이, 제2변환 배수가 1/1.85546875인바, 메모리 1의 정보는 그대로 읽어오고, 제2변환 배수에 기초하여 메모리 2와 메모리 3을, 메모리 4와 메모리 5를, 메모리 6과 메모리 7을, 메모리 8과 메모리 9를, 메모리 10과 메모리 11을, 메모리 12와 메모리 13을 함께 읽을 수 있다. Therefore, as explained in relation to FIG. 5, since the second conversion multiplier is 1/1.85546875, the information in memory 1 is read as is, and memory 2 and memory 3, and memory 4 and memory 5 are read based on the second conversion multiple. , memory 6 and memory 7, memory 8 and memory 9, memory 10 and memory 11, and memory 12 and memory 13 can be read together.
이때, 프로세서(150)는 메모리들의 정보를 함께 읽어오면서 바로 연산하여 변환 이미지(30)의 픽셀값을 바로 출력할 수 있다.At this time, the processor 150 can immediately output the pixel value of the converted image 30 by reading information from the memories together and performing calculations immediately.
도 7은 본 발명의 일 실시예에 따른 이미지 스케일링 장치의 업 스케일링 동작 모습을 도시한 도면이다.FIG. 7 is a diagram illustrating an upscaling operation of an image scaling device according to an embodiment of the present invention.
본 발명의 일 실시예에 따르면, 프로세서(150)는 입력 이미지(10)의 복수의 픽셀의 픽셀값을 식별하고, 각 픽셀과 이웃하는 적어도 하나의 픽셀 간 복수의 중간 픽셀값을 식별할 수 있다. According to one embodiment of the present invention, the processor 150 may identify pixel values of a plurality of pixels of the input image 10 and identify a plurality of intermediate pixel values between each pixel and at least one neighboring pixel. .
예를 들어, 입력 이미지(10)의 복수의 픽셀의 픽셀값이 각각 10, 20, 30인 경우를 본다. 픽셀값 10을 가지는 픽셀과 이웃하는 픽셀값 20을 가지는 픽셀 간의 복수의 중간 픽셀값을 구한다. 이때, 복수의 중간 픽셀값은 픽셀값의 평균값일 수 있고, 어느 하나의 픽셀값과 평균값 사이의 중간값을 포함할 수 있다. 즉, 10과 20 사이의 중간 픽셀값은 평균값인 15와, 10과 15의 중간값인 12와, 15와 20의 중간값인 17일 수 있다. For example, consider the case where the pixel values of a plurality of pixels of the input image 10 are 10, 20, and 30, respectively. A plurality of intermediate pixel values between a pixel with a pixel value of 10 and a neighboring pixel with a pixel value of 20 are obtained. At this time, the plurality of intermediate pixel values may be an average value of pixel values and may include an intermediate value between any one pixel value and the average value. That is, the middle pixel value between 10 and 20 may be 15, which is the average value, 12, which is the middle value between 10 and 15, and 17, which is the middle value between 15 and 20.
따라서, 10과 20사이의 복수의 중간 픽셀값은 12, 15, 17일 수 있다. 이때 추가할 픽셀 수에 따라 더욱 촘촘히 계산할 수 있다. Accordingly, the plurality of intermediate pixel values between 10 and 20 may be 12, 15, and 17. At this time, the calculation can be done more precisely depending on the number of pixels to be added.
프로세서(150)는 추가할 픽셀의 개수 별로 픽셀값 및 중간 픽셀값을 포함하는 업 스케일링 정보를 2 이상의 메모리(140)에 저장할 수 있다. The processor 150 may store upscaling information including pixel values and intermediate pixel values for each number of pixels to be added in two or more memories 140 .
예를 들어, 1개의 픽셀을 추가하려는 경우, 10과 15를 포함하는 업 스케일링 정보를 저장하고, 2개의 픽셀을 추가하려는 경우, 10, 12, 17를 포함하는 업 스케일링 정보를 저장할 수 있다. 이때, 프로세서(150)는 픽셀 수와, 대응하는 픽셀값을 나열하여 저장할 수 있다.For example, if you want to add 1 pixel, upscaling information including 10 and 15 can be stored, and if you want to add 2 pixels, upscaling information including 10, 12, and 17 can be stored. At this time, the processor 150 may list and store the number of pixels and the corresponding pixel values.
이때, 앞서 다운 스케일링과 관련하여 설명한 바와 같이, 메모리(140)는 라인 수에 따라 링 버퍼처럼 사용 가능하며, 메모리를 일정 개수별로 나눈 복수의 링 버퍼로 사용할 수도 있다. At this time, as previously described in relation to downscaling, the memory 140 can be used as a ring buffer depending on the number of lines, and can also be used as a plurality of ring buffers divided by a certain number of memories.
본 발명의 일 실시예에 따르면, 업 스케일링 또한 다운 스케일링과 마찬가지로 변환 배수를 식별한다. According to one embodiment of the present invention, upscaling, like downscaling, identifies a conversion multiplier.
본 발명의 일 실시예에 따르면, 프로세서(150)는 제1변환 배수에 기초하여 픽셀값 및 추가할 픽셀 수에 대응하는 중간 픽셀값을 포함하는 제1업 스케일링 정보를 2 이상의 메모리에 저장할 수 있다. According to one embodiment of the present invention, the processor 150 may store first up-scaling information including a pixel value based on the first transform multiplier and an intermediate pixel value corresponding to the number of pixels to be added in two or more memories. .
도 7을 참조하면, 입력 이미지(710)는 3 픽셀*2 픽셀의 크기를 가지고, 변환 크기는 9 픽셀*6 픽셀의 크기를 가지고, 제1변환 배수에 기초하여 먼저 업 스케일링한다고 가정한다. Referring to FIG. 7, it is assumed that the input image 710 has a size of 3 pixels*2 pixels, the transformation size has a size of 9 pixels*6 pixels, and is first upscaled based on the first transformation multiplier.
본 발명의 일 실시예에 따르면, 프로세서(150)는 앞서 서술한 바와 같이 나눗셈 설계블록(151), 고정 소수점 설계블록(152)를 이용하여 제1변환 배수는 3배, 제2변환 배수는 3배임을 식별할 수 있다.According to one embodiment of the present invention, the processor 150 uses the division design block 151 and the fixed point design block 152 as described above to achieve a first conversion multiple of 3 and a second conversion multiple of 3. A breach of trust can be identified.
본 발명의 일 실시예에 따르면, 프로세서(150)는 제1변환 배수에 기초하여 픽셀값 및 추가할 픽셀 수에 대응하는 중간 픽셀값을 포함하는 제1업 스케일링 정보를 식별한다. According to one embodiment of the present invention, the processor 150 identifies first up-scaling information including a pixel value and an intermediate pixel value corresponding to the number of pixels to be added based on the first transform multiplier.
예를 들어, 입력 이미지(710)의 라인 1에는 픽셀값 10, 20, 30인 픽셀이 존재하고, 너비 방향으로 3배로 업 스케일링하기 위해서는 10과 20 픽셀 사이에는 4개의 중간 픽셀값이, 20과 30 픽셀 사이에는 2개의 중간 픽셀값이 필요하다. 이때, 추가할 픽셀 수를 식별하는 방법은 도 8을 참조하여 설명한다.For example, in line 1 of the input image 710, there are pixels with pixel values 10, 20, and 30, and in order to upscale by 3 times in the width direction, there are 4 intermediate pixel values between 10 and 20 pixels, and 20 and 30. Between 30 pixels, two intermediate pixel values are needed. At this time, a method of identifying the number of pixels to be added will be described with reference to FIG. 8.
본 발명의 일 실시예에 따르면, 프로세서(150)는 라인 1에서 10과 20 픽셀 사이의 4개의 중간 픽셀값 12, 15, 17, 18과, 20과 30 픽셀 사이의 2개의 중간 픽셀값 23, 27을 식별하고, 라인 2에서 20과 30 픽셀사이의 4개의 중간 픽셀값 22, 25, 27, 28과 30과 40 픽셀 사이의 2개의 중간 픽셀값 32, 37을 식별한다.According to one embodiment of the present invention, the processor 150 outputs four intermediate pixel values 12, 15, 17, and 18 between pixels 10 and 20 in line 1, and two intermediate pixel values 23 between pixels 20 and 30. Identify 27, and in line 2 identify the four intermediate pixel values 22, 25, 27, and 28 between pixels 20 and 30 and the two intermediate pixel values 32 and 37 between pixels 30 and 40.
상기 프로세서(150)는 식별한 픽셀값들을 포함하는 제1업 스케일링 정보를 식별한다. 만일, 프로세서(150)가 바로 스케일링을 수행하는 경우 너비 방향으로 확대된 이미지(720)를 생성할 수 있다. 다만, 본 발명은 바로 스케일링 하지 않고, 제1업 스케일링 정보는 메모리(140)에 순차적으로 저장한다.The processor 150 identifies first up-scaling information including the identified pixel values. If the processor 150 immediately performs scaling, an image 720 enlarged in the width direction can be generated. However, in the present invention, scaling is not performed immediately, and the first up-scaling information is sequentially stored in the memory 140.
그 후, 프로세서(150)는 제1업 스케일링 정보 및 제2변환 배수에 기초하여 추가할 픽셀 수에 대응하는 중간 픽셀값을 포함하는 제2업 스케일링 정보를 식별한다. Thereafter, the processor 150 identifies second up-scaling information including an intermediate pixel value corresponding to the number of pixels to be added based on the first up-scaling information and the second transform multiplier.
예를 들어, 중간 이미지(720)의 라인 1에는 픽셀값 10, 12, 15, 17, 18, 20, 23, 27, 30인 픽셀이 존재하고, 라인 2에는 픽셀값 20, 22, 25, 27, 28, 30, 32, 37, 40인 픽셀이 존재한다. For example, line 1 of the middle image 720 has pixels with pixel values 10, 12, 15, 17, 18, 20, 23, 27, and 30, and line 2 has pixel values 20, 22, 25, and 27. There are pixels numbered , 28, 30, 32, 37, and 40.
높이 방향으로 3배로 업 스케일링하기 위해서는 라인 1과 라인 2 사이에는 높이 방향으로 4개의 중간 픽셀값이 필요하다. In order to upscale by 3 times in the height direction, 4 intermediate pixel values in the height direction are required between line 1 and line 2.
본 발명의 일 실시예에 따르면, 프로세서(150)는 라인 1과 라인 2 사이의 4라인의 중간 픽셀값들을 포함하는 제2업 스케일링 정보를 식별하고, 제2업 스케일링 정보를 순차적으로 읽어 변환 이미지(730)를 생성한다. According to one embodiment of the present invention, the processor 150 identifies second up-scaling information including intermediate pixel values of 4 lines between line 1 and line 2, and sequentially reads the second up-scaling information to create a converted image. Generates (730).
도 8은 본 발명의 일 실시예에 따른 이미지 스케일링 장치의 업 스케일링 시 변환 배수에 따라 추가할 픽셀 수에 관한 룩업 테이블을 도시한 도면이다. FIG. 8 is a diagram illustrating a lookup table for the number of pixels to be added according to the conversion multiplier during upscaling of the image scaling device according to an embodiment of the present invention.
도 8에 도시된 룩업 테이블(800)은 변환 배수에 따른 추가 픽셀의 수를 나타내고 있다. The lookup table 800 shown in FIG. 8 indicates the number of additional pixels according to the conversion multiplier.
본 발명의 일 실시예에 따르면, 프로세서(150)는 룩업 테이블(800)에 기초하여 제1변환 배수 및 제2변환 배수에 따라 추가할 픽셀 수를 식별할 수 있다.According to one embodiment of the present invention, the processor 150 may identify the number of pixels to be added according to the first transform multiplier and the second transform multiplier based on the lookup table 800.
예를 들어, 도 7의 입력 이미지(710)의 제1변환 배수는 3배, 제2변환 배수는 3배이다. 룩업 테이블(800)을 참조하면, 변환 배수가 3배인 경우, 초기 픽셀 간 추가 픽셀의 수는 4개, 이후 픽셀 간 추가 픽셀의 수는 2개이다.For example, the first transform multiple of the input image 710 of FIG. 7 is 3 times and the second transform multiple is 3 times. Referring to the lookup table 800, when the conversion multiple is 3, the number of additional pixels between initial pixels is 4, and the number of additional pixels between subsequent pixels is 2.
따라서, 입력 이미지(710)를 너비 방향으로 업 스케일링 하는 경우, 라인 1에서 10과 20 사이에는 4개의 픽셀이, 20과 30 사이에는 2개의 픽셀이 추가로 필요하다.Therefore, when upscaling the input image 710 in the width direction, 4 pixels are additionally required between lines 10 and 20, and 2 pixels are additionally required between 20 and 30.
다른 예로, 입력 이미지가 4 픽셀*4 픽셀의 크기를 가지고, 변환 크기는 11 픽셀*6 픽셀의 크기를 가져, 제1변환 배수는 2.75배, 제2변환 배수는 1.5배라고 가정한다.As another example, assume that the input image has a size of 4 pixels x 4 pixels, the conversion size has a size of 11 pixels x 6 pixels, the first conversion multiple is 2.75 times, and the second conversion multiple is 1.5 times.
룩업 테이블(800)을 참조하면, 변환 배수가 2.75배인 경우, 초기 픽셀 간 추가 픽셀의 수는 3개, 이후 픽셀 간 추가 픽셀의 수는 1개 또는 2개이다.Referring to the lookup table 800, when the conversion multiplier is 2.75 times, the number of additional pixels between initial pixels is 3, and the number of additional pixels between subsequent pixels is 1 or 2.
따라서, 초기 픽셀 간 추가 픽셀의 수는 3개이고, 이후 추가 픽셀은 변환 배수의 소수값의 합이 1을 초과하지 않으면 1개, 1을 초과하면 2개로 설정된다. Therefore, the number of additional pixels between initial pixels is 3, and the number of additional pixels thereafter is set to 1 if the sum of the decimal values of the conversion multiples does not exceed 1, and 2 if the sum of the decimal values of the conversion multiples exceeds 1.
따라서, 너비 방향의 4픽셀 중 첫번째 픽셀과 두번째 픽셀 사이에는 3개의 추가 픽셀, 두번째 픽셀과 세번째 픽셀 사이에는 2개의 추가 픽셀, 세번째 픽셀과 네번째 픽셀 사이에는 2개의 추가 픽셀이 필요하다.Therefore, among the 4 pixels in the width direction, 3 additional pixels are required between the first and second pixels, 2 additional pixels are required between the 2nd and 3rd pixels, and 2 additional pixels are required between the 3rd and 4th pixels.
도 9는 본 발명의 일 실시예에 따른 이미지 스케일링 장치의 동작 모습을 도시한 도면이다.Figure 9 is a diagram showing the operation of an image scaling device according to an embodiment of the present invention.
도 9는 도 7을 참조하여 설명한 스케일링 과정을 메모리를 이용하여 수행하는 모습을 도시한다. FIG. 9 shows the scaling process described with reference to FIG. 7 being performed using memory.
본 발명의 일 실시예에 따르면, 스케일링 장치(100)는 2 이상의 메모리(140)를 가진다. 도 9를 참조하면 메모리(140)는 17개의 메모리로 구성된다. 이때, 메모리의 개수 및 구조는 본 도면에 의해 한정되지 않는다. According to one embodiment of the present invention, the scaling device 100 has two or more memories 140. Referring to FIG. 9, the memory 140 consists of 17 memories. At this time, the number and structure of memories are not limited by this drawing.
도 7의 예시를 그대로 이어가면, 프로세서(150)는 입력 이미지(710)를 이루는 복수의 픽셀의 픽셀값 및 제1변환 배수에 기초하여 추가할 픽셀 수에 대응하는 중간 픽셀값을 포함하는 제1업 스케일링 정보를 2 이상의 메모리(140)에 저장할 수 있다. Continuing the example of FIG. 7, the processor 150 generates a first pixel value including a pixel value of a plurality of pixels constituting the input image 710 and an intermediate pixel value corresponding to the number of pixels to be added based on the first transform multiplier. Upscaling information can be stored in two or more memories 140.
도 9를 참조하면, 프로세서(150)는 도 7의 입력 이미지(710)의 라인 별로 제1업 스케일링 정보를 메모리(140)에 순차적으로 저장한다.Referring to FIG. 9 , the processor 150 sequentially stores first up-scaling information in the memory 140 for each line of the input image 710 of FIG. 7 .
프로세서(150)는 라인 1의 제1업 스케일링 정보{(5, 10, 12, 15, 17, 18), (3, 20, 23, 27), (1, 30)}를 메모리 1에 저장하고, 라인 2의 제1업 스케일링 정보{(5,20,22,25,27,28), (3,30,33,37), (1,40)}를 메모리 2에 저장한다.The processor 150 stores the first upscaling information {(5, 10, 12, 15, 17, 18), (3, 20, 23, 27), (1, 30)} of line 1 in memory 1, and , the first upscaling information {(5,20,22,25,27,28), (3,30,33,37), (1,40)} of line 2 is stored in memory 2.
앞서 서술한 바와 같이, 도 9에 도시된 메모리는 17개이지만 2개의 라인으로 구성되는 바, 메모리 2까지 제1업 스케일링 정보가 저장된다. 라인의 개수가 메모리 개수보다 많은 경우, 메모리는 링 버퍼와 같이 이용되어 다시 처음 메모리 순으로 저장될 수 있다. As described above, there are 17 memories shown in FIG. 9, but they are composed of two lines, and the first up-scaling information is stored up to memory 2. If the number of lines is greater than the number of memories, the memory can be used like a ring buffer and stored in the first memory order again.
제1업 스케일링 정보가 순차적으로 메모리(140)에 저장된 경우, 프로세서(150)는 제1업 스케일링 정보 및 제2변환 배수에 기초하여 추가할 픽셀 수에 대응하는 중간 픽셀값을 포함하는 제2업 스케일링 정보를 2 이상의 메모리(140)에 저장할 수 있다. When the first up-scaling information is sequentially stored in the memory 140, the processor 150 generates a second up-scaling information including an intermediate pixel value corresponding to the number of pixels to be added based on the first up-scaling information and the second transform multiplier. Scaling information can be stored in two or more memories 140.
프로세서(150)는 높이 방향으로 추가된 픽셀 수에 따라 늘어난 6개의 라인 각각에 대응하는 제2업 스케일링 정보를 메모리 3 내지 메모리 8에 저장할 수 있다. The processor 150 may store second up-scaling information corresponding to each of the six lines increased according to the number of pixels added in the height direction in memories 3 to 8.
프로세서(150)는 메모리 3 내지 메모리 8에 저장된 제2업 스케일링 정보를 순차적으로 읽어 변환 이미지(730)를 생성할 수 있다. 이때, 각 메모리에 제2업 스케일링 정보를 라인별로 저장해둠으로써 통신 장애 등으로 변환 이미지 생성 시 발생할 수 있는 정보 누락을 방지할 수 있다.The processor 150 may sequentially read the second up-scaling information stored in memories 3 to 8 to generate the converted image 730. At this time, by storing the second up-scaling information for each line in each memory, information omission that may occur when generating a converted image due to communication failure, etc. can be prevented.
[이 발명을 지원한 국가연구개발사업][National research and development project that supported this invention]
[과제고유번호] 1711152982[Assignment number] 1711152982
[과제번호] 2021-0-00131-002[Assignment number] 2021-0-00131-002
[부처명] 과학기술정보통신부[Ministry Name] Ministry of Science and ICT
[과제관리(전문)기관명] 정보통신기획평가원[Project management (professional) organization name] Information and Communications Planning and Evaluation Institute
[연구사업명] 인공지능반도체응용기술개발(R&D)[Research project name] Artificial intelligence semiconductor application technology development (R&D)
[연구과제명] 제조검사장비 경량화를 위한 지능형 엣지컴퓨팅 반도체 개발[Research project name] Development of intelligent edge computing semiconductors for lightweight manufacturing inspection equipment
[기여율] 1/1[Contribution rate] 1/1
[과제수행기관명] (주)네패스[Name of project carrying out organization] Nepes Co., Ltd.
[연구기간] 2022.01.01 ~ 2022.12.31[Research period] 2022.01.01 ~ 2022.12.31

Claims (20)

  1. 이미지 스케일링 장치에 있어서,In the image scaling device,
    2 이상의 메모리;2 or more memory;
    입력 이미지, 상기 입력 이미지의 크기에 대한 정보 및 변환 크기에 대한 정보를 수신하고,Receiving an input image, information about the size of the input image, and information about the transformation size,
    상기 입력 이미지의 크기 및 상기 변환 크기에 기초하여 너비에 대응하는 제1변환 배수 및 높이에 대응하는 제2변환 배수를 식별하고,Identifying a first transform multiple corresponding to the width and a second transform multiple corresponding to the height based on the size of the input image and the transform size,
    상기 제1변환 배수 및 상기 제2변환 배수 중 어느 하나의 변환 배수에 기초하여 상기 입력 이미지의 복수의 픽셀을 제1복수의 그룹으로 나누어 순차적으로 상기 제1복수의 그룹에 대한 정보를 상기 2 이상의 메모리에 저장하고,Based on any one of the first transform multiplier and the second transform multiple, a plurality of pixels of the input image are divided into a first plurality of groups and information about the first plurality of groups is sequentially provided to the two or more groups. save it in memory,
    상기 제1변환 배수 및 상기 제2변환 배수 중 나머지 하나의 변환 배수에 기초하여 상기 제1복수의 그룹을 제2복수의 그룹으로 묶은 후, 상기 제2복수의 그룹 각각에 포함된 픽셀의 평균값을 식별하여 변환 이미지를 생성하는 프로세서를 포함하는 이미지 스케일링 장치.After grouping the first plurality of groups into a second plurality of groups based on the remaining one of the first transformation multiplier and the second transformation multiplier, the average value of the pixels included in each of the second plurality of groups is calculated. An image scaling device including a processor that identifies and generates a transformed image.
  2. 제1항에 있어서,According to paragraph 1,
    상기 프로세서는 나눗셈 설계 블록 및 고정 소수점 설계 블록을 포함하고,The processor includes a division design block and a fixed point design block,
    상기 나눗셈 설계 블록은,The division design block is,
    상기 입력 이미지의 크기 및 상기 변환 크기를 나누어 획득한 몫과 나머지 중 상기 몫을 상기 제1변환 배수 및 상기 제2변환 배수의 정수값으로 식별하고,Identifying the quotient among the quotient and the remainder obtained by dividing the size of the input image and the transformation size as an integer value of the first transformation multiplier and the second transformation multiplier,
    상기 고정 소수점 설계 블록은,The fixed point design block is,
    상기 나머지 및 상기 변환 크기를 이용하여 상기 제1변환 배수 및 상기 제2변환 배수의 소수값을 식별하는 이미지 스케일링 장치.An image scaling device that identifies decimal values of the first transform multiple and the second transform multiple using the remainder and the transform size.
  3. 제2항에 있어서,According to paragraph 2,
    상기 고정 소수점 설계 블록은,The fixed point design block is,
    (1) 상기 변환 크기가 상기 나머지의 2배보다 작은 경우, 상기 소수값의 최상 비트값을 1로 지정하고, 상기 나머지의 2배에서 상기 변환 크기를 뺀 값을 출력하고,(1) If the conversion size is less than 2 times the remainder, set the most significant bit value of the decimal value to 1, and output a value obtained by subtracting the conversion size from 2 times the remainder,
    또는 상기 변환 크기가 상기 나머지의 2배보다 작지 않은 경우, 상기 소수값의 최상 비트값을 0으로 지정하고, 상기 나머지를 2배한 값을 출력하고,Or, if the conversion size is not less than twice the remainder, the most significant bit value of the decimal value is set to 0, and a value obtained by doubling the remainder is output,
    (2) 상기 변환 크기가 이전 단계의 출력값의 2배보다 작은 경우, 상기 소수값의 다음 비트값을 1로 지정하고, 상기 이전 단계의 출력값의 2배에서 상기 변환 크기를 뺀 값을 출력하고,(2) If the conversion size is less than twice the output value of the previous step, set the next bit value of the decimal value to 1, and output a value obtained by subtracting the conversion size from twice the output value of the previous step,
    또는 상기 변환 크기가 상기 이전 단계의 출력값의 2배보다 작지 않은 경우, 상기 소수값의 다음 비트값을 0으로 지정하고, 상기 이전 단계의 출력값을 2배한 값을 출력하고,Or, if the conversion size is not smaller than twice the output value of the previous step, designate the next bit value of the decimal value as 0 and output a value that is twice the output value of the previous step,
    (3) 상기 소수값이 8개의 2진수 비트값을 가질 때까지 상기 (2) 단계를 반복하는 이미지 스케일링 장치.(3) An image scaling device that repeats step (2) until the decimal value has 8 binary bit values.
  4. 제1항에 있어서,According to paragraph 1,
    상기 프로세서는,The processor,
    상기 어느 하나의 변환 배수가 상기 제1변환 배수인 경우 상기 입력 이미지의 너비 방향의 라인 별 포함된 픽셀들을 상기 제1변환 배수에 따라 그루핑(grouping)하고, 상기 어느 하나의 변환 배수가 상기 제2변환 배수인 경우 상기 입력 이미지의 높이 방향의 라인 별 포함된 픽셀들을 상기 제2변환 배수에 따라 그루핑하여 상기 제1복수의 그룹을 생성하는 이미지 스케일링 장치.When the one transform multiple is the first transform multiple, the pixels included in each line in the width direction of the input image are grouped according to the first transform multiple, and the one transform multiple is the second transform multiple. In the case of a transformation multiplier, an image scaling device for generating the first plurality of groups by grouping pixels included in each line in the height direction of the input image according to the second transformation multiplier.
  5. 제4항에 있어서,According to clause 4,
    상기 프로세서는,The processor,
    상기 어느 하나의 변환 배수가 상기 제1변환 배수인 경우 상기 입력 이미지의 너비 방향의 라인 별로, 상기 어느 하나의 변환 배수가 상기 제2변환 배수인 경우 상기 입력 이미지의 높이 방향의 라인 별로 상기 제1복수의 그룹에 대한 정보를 상기 2 이상의 메모리에 저장하는 이미지 스케일링 장치.When the one transform multiple is the first transform multiple, the first transform multiple is applied for each line in the width direction of the input image, and for each line in the height direction of the input image when the one transform multiple is the second transform multiple. An image scaling device that stores information about a plurality of groups in the two or more memories.
  6. 제5항에 있어서,According to clause 5,
    상기 제1복수의 그룹에 대한 정보는, 각 그룹에 포함된 픽셀의 수와 각 그룹에 포함된 픽셀의 픽셀값의 합의 정보를 포함하는 것을 특징으로 하는 이미지 스케일링 장치.The information about the first plurality of groups includes information about the sum of the number of pixels included in each group and the pixel values of the pixels included in each group.
  7. 제1항에 있어서,According to paragraph 1,
    상기 프로세서는,The processor,
    상기 나머지 하나의 변환 배수에 기초하여 상기 2 이상의 메모리로부터 상기 제1복수의 그룹에 대한 정보를 순차적으로 읽어오면서 상기 제1복수의 그룹을 상기 제2복수의 그룹으로 묶는 이미지 스케일링 장치.An image scaling device that groups the first plurality of groups into the second plurality of groups while sequentially reading information about the first plurality of groups from the two or more memories based on the remaining conversion multiple.
  8. 제7항에 있어서,In clause 7,
    상기 프로세서는,The processor,
    상기 제2복수의 그룹 중 각 그룹에 포함된 픽셀의 수와 각 그룹에 포함된 픽셀의 픽셀값의 합의 정보를 포함하는 상기 제2복수의 그룹에 대한 정보를 상기 2 이상의 메모리에 저장하는 이미지 스케일링 장치.Image scaling for storing information about the second plurality of groups in the two or more memories, including information on the sum of the number of pixels included in each group among the second plurality of groups and the pixel values of the pixels included in each group. Device.
  9. 제4항 또는 제7항에 있어서,According to paragraph 4 or 7,
    상기 프로세서는,The processor,
    상기 나머지 하나의 변환 배수의 정수값에 대응하는 라인 개수만큼 상기 제1복수의 그룹에 대한 정보를 순차적으로 읽어오면서 상기 제1복수의 그룹을 상기 제2복수의 그룹으로 묶고,Grouping the first plurality of groups into the second plurality of groups while sequentially reading information on the first plurality of groups as many lines as the number of lines corresponding to the integer value of the remaining conversion multiple,
    상기 묶이는 제2복수의 그룹의 개수만큼 상기 나머지 하나의 변환 배수의 소수값의 합을 구하고, Calculate the sum of the decimal values of the remaining conversion multiples as many as the number of the second plurality groups,
    상기 소수값의 합이 1씩 초과할 때 마다 상기 라인 개수보다 하나 더 읽어오면서 상기 제1복수의 그룹을 상기 제2복수의 그룹으로 묶는 이미지 스케일링 장치.An image scaling device that groups the first plurality of groups into the second plurality of groups by reading one more line than the number of lines each time the sum of the decimal values exceeds 1.
  10. 제1항에 있어서,According to paragraph 1,
    상기 프로세서는,The processor,
    상기 입력 이미지의 복수의 픽셀의 픽셀값을 식별하고, Identifying pixel values of a plurality of pixels of the input image,
    상기 각 픽셀과 이웃하는 적어도 하나의 픽셀 간 복수의 중간 픽셀값을 식별하고, Identifying a plurality of intermediate pixel values between each pixel and at least one neighboring pixel,
    상기 제1변환 배수에 기초하여 상기 픽셀값 및 추가할 픽셀 수에 대응하는 상기 중간 픽셀값을 포함하는 제1업 스케일링 정보를 상기 2 이상의 메모리에 저장하고,Store first up-scaling information including the pixel value and the intermediate pixel value corresponding to the number of pixels to be added based on the first conversion multiplier in the two or more memories,
    상기 제1업 스케일링 정보 및 상기 제2변환 배수에 기초하여 추가할 픽셀 수에 대응하는 중간 픽셀값을 포함하는 제2업 스케일링 정보를 상기 2 이상의 메모리에 저장하고,Store second up-scaling information including an intermediate pixel value corresponding to the number of pixels to be added based on the first up-scaling information and the second transform multiplier in the two or more memories,
    상기 2 이상의 메모리에 저장된 상기 제2업 스케일링 정보를 순차적으로 읽어 상기 변환 이미지를 생성하는 스케일링 장치.A scaling device that generates the converted image by sequentially reading the second up-scaling information stored in the two or more memories.
  11. 이미지 스케일링 장치에 의해 수행되는 이미지 스케일링 방법에 있어서,In an image scaling method performed by an image scaling device,
    입력 이미지, 상기 입력 이미지의 크기에 대한 정보 및 변환 크기에 대한 정보를 수신하는 단계;Receiving an input image, information about the size of the input image, and information about the conversion size;
    상기 입력 이미지의 크기 및 상기 변환 크기에 기초하여 너비에 대응하는 제1변환 배수 및 높이에 대응하는 제2변환 배수를 식별하는 단계;Identifying a first transform multiplier corresponding to the width and a second transform multiplier corresponding to the height based on the size of the input image and the transform size;
    상기 제1변환 배수 및 상기 제2변환 배수 중 어느 하나의 변환 배수에 기초하여 상기 입력 이미지의 복수의 픽셀을 제1복수의 그룹으로 나누어 순차적으로 상기 제1복수의 그룹에 대한 정보를 저장하는 단계;Dividing a plurality of pixels of the input image into a first plurality of groups based on one of the first transformation multiplier and the second transformation multiplier and sequentially storing information about the first plurality of groups ;
    상기 제1변환 배수 및 상기 제2변환 배수 중 나머지 하나의 변환 배수에 기초하여 상기 제1복수의 그룹을 제2복수의 그룹으로 묶은 후, 상기 제2복수의 그룹 각각에 포함된 픽셀의 평균값을 식별하여 변환 이미지를 생성하는 단계를 포함하는 이미지 스케일링 방법.After grouping the first plurality of groups into a second plurality of groups based on the remaining one of the first transformation multiplier and the second transformation multiplier, the average value of the pixels included in each of the second plurality of groups is calculated. An image scaling method comprising identifying and generating a transformed image.
  12. 제11항에 있어서,According to clause 11,
    상기 제1변환 배수 및 상기 제2변환 배수를 식별하는 단계는, The step of identifying the first conversion multiple and the second conversion multiple is,
    상기 입력 이미지의 크기 및 상기 변환 크기를 나누어 획득한 몫과 나머지 중 상기 몫을 상기 제1변환 배수 및 상기 제2변환 배수의 정수값으로 식별하는 단계;identifying the quotient among the quotient and the remainder obtained by dividing the size of the input image and the transform size as integer values of the first transform multiplier and the second transform multiplier;
    상기 나머지 및 상기 변환 크기를 이용하여 상기 제1변환 배수 및 상기 제2변환 배수의 소수값을 식별하는 단계를 포함하는 이미지 스케일링 방법.An image scaling method comprising identifying decimal values of the first transform multiple and the second transform multiple using the remainder and the transform size.
  13. 제12항에 있어서,According to clause 12,
    상기 제1변환 배수 및 상기 제2변환 배수의 소수값을 식별하는 단계는,The step of identifying decimal values of the first conversion multiple and the second conversion multiple is,
    (1) 상기 변환 크기가 상기 나머지의 2배보다 작은 경우, 상기 소수값의 최상 비트값을 1로 지정하고, 상기 나머지의 2배에서 상기 변환 크기를 뺀 값을 출력하고,(1) If the conversion size is less than 2 times the remainder, set the most significant bit value of the decimal value to 1, and output a value obtained by subtracting the conversion size from 2 times the remainder,
    또는 상기 변환 크기가 상기 나머지의 2배보다 작지 않은 경우, 상기 소수값의 최상 비트값을 0으로 지정하고, 상기 나머지를 2배한 값을 출력하는 단계;or when the conversion size is not less than twice the remainder, setting the most significant bit value of the decimal value to 0 and outputting a value obtained by doubling the remainder;
    (2) 상기 변환 크기가 이전 단계의 출력값의 2배보다 작은 경우, 상기 소수값의 다음 비트값을 1로 지정하고, 상기 이전 단계의 출력값의 2배에서 상기 변환 크기를 뺀 값을 출력하고,(2) If the conversion size is less than twice the output value of the previous step, set the next bit value of the decimal value to 1, and output a value obtained by subtracting the conversion size from twice the output value of the previous step,
    또는 상기 변환 크기가 상기 이전 단계의 출력값의 2배보다 작지 않은 경우, 상기 소수값의 다음 비트값을 0으로 지정하고, 상기 이전 단계의 출력값을 2배한 값을 출력하는 단계;Or, if the conversion size is not smaller than twice the output value of the previous step, designating the next bit value of the decimal value as 0 and outputting a value that is twice the output value of the previous step;
    (3) 상기 소수값이 8개의 2진수 비트값을 가질 때까지 상기 (2) 단계를 반복하는 단계를 포함하는 이미지 스케일링 방법.(3) An image scaling method comprising repeating step (2) until the decimal value has 8 binary bit values.
  14. 제11항에 있어서,According to clause 11,
    상기 제1복수의 그룹에 대한 정보를 저장하는 단계는,The step of storing information about the first plurality of groups includes:
    상기 어느 하나의 변환 배수가 상기 제1변환 배수인 경우 상기 입력 이미지의 너비 방향의 라인 별 포함된 픽셀들을 상기 제1변환 배수에 따라 그루핑(grouping)하고, 상기 어느 하나의 변환 배수가 상기 제2변환 배수인 경우 상기 입력 이미지의 높이 방향의 라인 별 포함된 픽셀들을 상기 제2변환 배수에 따라 그루핑하여 상기 제1복수의 그룹을 생성하는 단계를 포함하는 이미지 스케일링 방법.When the one transform multiple is the first transform multiple, the pixels included in each line in the width direction of the input image are grouped according to the first transform multiple, and the one transform multiple is the second transform multiple. In the case of a transformation multiplier, an image scaling method comprising generating the first plurality of groups by grouping pixels included in each line in the height direction of the input image according to the second transformation multiplier.
  15. 제14항에 있어서,According to clause 14,
    상기 제1복수의 그룹에 대한 정보를 저장하는 단계는, The step of storing information about the first plurality of groups includes:
    상기 어느 하나의 변환 배수가 상기 제1변환 배수인 경우 상기 입력 이미지의 너비 방향의 라인 별로, 상기 어느 하나의 변환 배수가 상기 제2변환 배수인 경우 상기 입력 이미지의 높이 방향의 라인 별로 상기 제1복수의 그룹에 대한 정보를 저장하는 단계를 포함하는 이미지 스케일링 방법.When the one transform multiple is the first transform multiple, the first transform multiple is applied for each line in the width direction of the input image, and for each line in the height direction of the input image when the one transform multiple is the second transform multiple. An image scaling method comprising storing information about a plurality of groups.
  16. 제15항에 있어서,According to clause 15,
    상기 제1복수의 그룹에 대한 정보는, 각 그룹에 포함된 픽셀의 수와 각 그룹에 포함된 픽셀의 픽셀값의 합의 정보를 포함하는 것을 특징으로 하는 이미지 스케일링 방법.The information about the first plurality of groups includes information about the sum of the number of pixels included in each group and the pixel values of the pixels included in each group.
  17. 제11항에 있어서,According to clause 11,
    상기 변환 이미지를 생성하는 단계는,The step of generating the converted image is,
    상기 나머지 하나의 변환 배수에 기초하여 저장된 상기 제1복수의 그룹에 대한 정보를 순차적으로 읽어오면서 상기 제1복수의 그룹을 상기 제2복수의 그룹으로 묶는 단계를 포함하는 이미지 스케일링 방법.An image scaling method comprising grouping the first plurality of groups into the second plurality of groups while sequentially reading information about the first plurality of groups stored based on the remaining conversion multiplier.
  18. 제17항에 있어서,According to clause 17,
    상기 제1복수의 그룹을 상기 제2복수의 그룹으로 묶는 단계는,The step of grouping the first plurality of groups into the second plurality of groups includes:
    상기 제2복수의 그룹 중 각 그룹에 포함된 픽셀의 수와 각 그룹에 포함된 픽셀의 픽셀값의 합의 정보를 포함하는 상기 제2복수의 그룹에 대한 정보를 저장하는 단계를 포함하는 이미지 스케일링 방법.An image scaling method comprising storing information about the second plurality of groups, including information on the sum of the number of pixels included in each group and the pixel values of the pixels included in each group. .
  19. 제14항 또는 제18항에 있어서,According to claim 14 or 18,
    상기 제2복수의 그룹으로 묶는 단계는,The step of grouping into the second plurality of groups is,
    상기 나머지 하나의 변환 배수의 정수값에 대응하는 라인 개수만큼 상기 제1복수의 그룹에 대한 정보를 순차적으로 읽어오면서 상기 제1복수의 그룹을 상기 제2복수의 그룹으로 묶는 단계;Grouping the first plurality of groups into the second plurality of groups by sequentially reading information about the first plurality of groups as many lines as the number of lines corresponding to the integer value of the remaining conversion multiple;
    상기 묶이는 제2복수의 그룹의 개수만큼 상기 나머지 하나의 변환 배수의 소수값의 합을 구하는 단계;calculating the sum of decimal values of the remaining conversion multiples as many as the number of the second plurality of groups;
    상기 소수값의 합이 1씩 초과할 때 마다 상기 라인 개수보다 하나 더 읽어오면서 상기 제1복수의 그룹을 상기 제2복수의 그룹으로 묶는 단계를 포함하는 이미지 스케일링 방법.An image scaling method comprising grouping the first plurality of groups into the second plurality of groups by reading one more line than the number of lines each time the sum of the decimal values exceeds 1.
  20. 제11항에 있어서,According to clause 11,
    상기 입력 이미지의 복수의 픽셀의 픽셀값을 식별하는 단계;identifying pixel values of a plurality of pixels of the input image;
    상기 각 픽셀과 이웃하는 적어도 하나의 픽셀 간 복수의 중간 픽셀값을 식별하는 단계;identifying a plurality of intermediate pixel values between each pixel and at least one neighboring pixel;
    상기 제1변환 배수에 기초하여 상기 픽셀값 및 추가할 픽셀 수에 대응하는 상기 중간 픽셀값을 포함하는 제1업 스케일링 정보를 저장하는 단계;storing first up-scaling information including the pixel value and the intermediate pixel value corresponding to the number of pixels to be added based on the first conversion multiplier;
    상기 제1업 스케일링 정보 및 상기 제2변환 배수에 기초하여 추가할 픽셀 수에 대응하는 중간 픽셀값을 포함하는 제2업 스케일링 정보를 저장하는 단계;storing second up-scaling information including an intermediate pixel value corresponding to the number of pixels to be added based on the first up-scaling information and the second transform multiplier;
    저장된 상기 제2업 스케일링 정보를 순차적으로 읽어 상기 변환 이미지를 생성하는 단계를 포함하는 이미지 스케일링 방법.An image scaling method comprising generating the converted image by sequentially reading the stored second up-scaling information.
PCT/KR2023/009230 2022-07-01 2023-06-30 Image scaling device and image scaling method WO2024005590A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
KR10-2022-0081126 2022-07-01
KR1020220081126A KR102611423B1 (en) 2022-07-01 2022-07-01 Image scaling device and image scaling method

Publications (1)

Publication Number Publication Date
WO2024005590A1 true WO2024005590A1 (en) 2024-01-04

Family

ID=89163260

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/KR2023/009230 WO2024005590A1 (en) 2022-07-01 2023-06-30 Image scaling device and image scaling method

Country Status (2)

Country Link
KR (1) KR102611423B1 (en)
WO (1) WO2024005590A1 (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100657145B1 (en) * 2005-02-24 2006-12-13 매그나칩 반도체 유한회사 Image sensor having scaler and image scaling method of image sensor
KR20150140729A (en) * 2013-04-08 2015-12-16 퀄컴 인코포레이티드 Sample adaptive offset scaling based on bit-depth
KR20180083861A (en) * 2015-11-19 2018-07-23 퀄컴 인코포레이티드 System and method for fixed-point approximation in display stream compression (DSC)
US20190306536A1 (en) * 2016-07-13 2019-10-03 Electronics And Telecommunications Research Institute Image encoding/decoding method and device
KR102348795B1 (en) * 2020-11-02 2022-01-07 주식회사 바움 Bit-width optimization for performing floating point to fixed point conversion

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100657145B1 (en) * 2005-02-24 2006-12-13 매그나칩 반도체 유한회사 Image sensor having scaler and image scaling method of image sensor
KR20150140729A (en) * 2013-04-08 2015-12-16 퀄컴 인코포레이티드 Sample adaptive offset scaling based on bit-depth
KR20180083861A (en) * 2015-11-19 2018-07-23 퀄컴 인코포레이티드 System and method for fixed-point approximation in display stream compression (DSC)
US20190306536A1 (en) * 2016-07-13 2019-10-03 Electronics And Telecommunications Research Institute Image encoding/decoding method and device
KR102348795B1 (en) * 2020-11-02 2022-01-07 주식회사 바움 Bit-width optimization for performing floating point to fixed point conversion

Also Published As

Publication number Publication date
KR102611423B1 (en) 2023-12-07

Similar Documents

Publication Publication Date Title
WO2018016720A1 (en) Image display device and image display method
WO2018113239A1 (en) Data scheduling method and system for convolutional neural network, and computer device
WO2020130496A1 (en) Display apparatus and control method thereof
WO2016159518A1 (en) Device for calculating average of nonlinear data
WO2017104934A1 (en) Device and method for common type conversion of plc control program
WO2017111197A1 (en) Big data visualisation system and method in learning analysis
WO2020149709A1 (en) Electronic apparatus and method for controlling thereof
WO2021153969A1 (en) Methods and systems for managing processing of neural network across heterogeneous processors
WO2021080209A1 (en) Display apparatus and operating method thereof
WO2020153626A1 (en) Electronic apparatus and control method thereof
WO2024005590A1 (en) Image scaling device and image scaling method
WO2019226025A1 (en) Method for displaying content of application via display, and electronic device
WO2020246848A1 (en) Device and method for sorting approximately encrypted ciphertext
WO2023042989A1 (en) Add operation method considering data scale, hardware accelerator therefor, and computing device using same
WO2021054696A1 (en) Display device, server, and method for correcting display device
WO2023153723A1 (en) Display device for dog and method for driving same
WO2020135022A1 (en) Display panel image optimization method and device and computer readable storage medium
WO2020135051A1 (en) Image optimization method and device for display panel, and computer readable storage medium
WO2023171981A1 (en) Surveillance camera management device
WO2024063197A1 (en) Image inpainting apparatus and method
WO2021054511A1 (en) Electronic device and control method therefor
WO2020130737A1 (en) Display apparatus and method of controlling the same
WO2022108114A1 (en) Stacked display device and control method thereof
WO2018093198A1 (en) Image processing apparatus and control method thereof
WO2016208806A1 (en) Integral image generation device using block structure and method therefor

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 23831948

Country of ref document: EP

Kind code of ref document: A1