Electronic device and method for filtering noise in an image
AssigneeHon Hai Precision Industry Co., Ltd.
InventorsCHUNG-I LEE, CHIEN-FA YEH, CHIU-HUA LU, CHENG-FENG TSAI
Life of this patent
Estimating the term…
Abstract
A method for filtering noise in an image filters noise pixels in a discrepant block between a current image and a background image firstly, and further filter each small block whose area is less than a preset value from the discrepant block. The method further calculates a total area of each big block whose area is greater than or equal to the preset value from the discrepant block, and adds the current image to a background list of the current image if the total area is less than another preset value.
Claims24
A computer-implemented method for filtering noise in an image using an electronic device comprising a processor, the method comprising execution of the steps comprising:
- obtaining a current image and a background image from a storage device using the processor;
- calculating a discrepant block between the current image and the background image upon the condition that a background list of the current image is not null using the processor;
- filtering each specified pixel of the discrepant block using the processor, a difference value between each specified pixel in the discrepant block and a corresponding pixel in the background image being less than a first preset value;
- filtering each small block of the discrepant block using the processor, an area of each small block being less than a second preset value;
- calculating a total area of each big block of the discrepant block using the processor, an area of each big block being greater than or equal to the second preset value;
- and
- adding the current image being filtered to the background list upon the condition that the total area is less than a third preset value using the processor.
A non-transitory storage medium having stored thereon instructions that, when executed by a processor of an electronic device, cause the electronic device to perform a method for filtering noise in an image, the method comprising:
- obtaining a current image and a background image from a storage device;
- calculating a discrepant block between the current image and the background image upon the condition that a background list of the current image is not null;
- filtering each specified pixel of the discrepant block, a difference value between each specified pixel in the discrepant block and a corresponding pixel in the background image being less than a first preset value;
- filtering each small block of the discrepant block, an area of each small block being less than a second preset value;
- calculating a total area of each big block of the discrepant block, an area of each big block being greater than or equal to the second preset value;
- and
- adding the current image being filtered to the background list upon the condition that the total area is less than a third preset value.
An electronic device, comprising:
- a storage device;
- at least one processor;
- and
- one or more modules that are stored in the storage device and executed by the at least one processor, the one or more modules comprising:
- an obtaining module that obtains a current image and a background image from the storage device;
- a calculating module that calculates a discrepant block between the current image and the background image upon the condition that a background list of the current image is not null;
- a filtering module that filters each pixel of the discrepant block, a difference value between each specified pixel in the discrepant block and a corresponding pixel in the background image being less than a first preset value;
- the filtering module that further filters each small block of the discrepant block, an area of each small block being less than a second preset value;
- the calculating module that further calculates a total area of each big block of the discrepant block, an area of each big block being greater than or equal to the second preset value;
- and
- an adding module that adds the current image being filtered to the background list upon the condition that the total area is less than a third preset value.
Dependencies are inferred from the claim text.