WO2018187917A1 - Method and device for assessing picture quality - Google Patents

Method and device for assessing picture quality Download PDF

Info

Publication number
WO2018187917A1
WO2018187917A1 PCT/CN2017/079975 CN2017079975W WO2018187917A1 WO 2018187917 A1 WO2018187917 A1 WO 2018187917A1 CN 2017079975 W CN2017079975 W CN 2017079975W WO 2018187917 A1 WO2018187917 A1 WO 2018187917A1
Authority
WO
WIPO (PCT)
Prior art keywords
picture
preprocessed
video file
edge
quality evaluation
Prior art date
Application number
PCT/CN2017/079975
Other languages
French (fr)
Chinese (zh)
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 深圳市柔宇科技有限公司
Priority to PCT/CN2017/079975 priority Critical patent/WO2018187917A1/en
Priority to CN201780004630.8A priority patent/CN108475430B/en
Publication of WO2018187917A1 publication Critical patent/WO2018187917A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/13Edge detection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/136Segmentation; Edge detection involving thresholding
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10016Video; Image sequence
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30168Image quality inspection

Definitions

  • the present invention relates to the field of image processing, and in particular, to a picture quality evaluation method and apparatus.
  • Video files in formats such as 360-degree video files and 3D video files do not have a uniform file identifier. Many players recognize whether the video file is in a 360-degree video format or a 3D video format by intercepting a picture frame in the video file. However, in the process of intercepting the picture frame, sometimes the picture with the solid color, the large area solid color or the low contrast is intercepted. This picture is not suitable as the basis for identifying the video type, and the picture frame needs to be re-interpreted after the recognition calculation. Recognizing again, resulting in a reduction in the efficiency of video format recognition.
  • the embodiment of the invention discloses a picture quality evaluation method and device, which improves the efficiency of video format recognition.
  • an embodiment of the present invention discloses a picture quality evaluation method, including:
  • the first picture is used to determine a target video file type when the N is greater than or equal to a first threshold.
  • an embodiment of the present invention discloses a picture quality evaluation apparatus, including:
  • a first acquiring module configured to acquire a first picture
  • a processing module configured to perform pre-processing on the first picture to obtain a pre-processed picture
  • a detecting module configured to perform edge detection on the preprocessed picture to count the number N of edge points,
  • the N is a positive integer
  • a determining module configured to use the first picture to determine a target video file type when the N is greater than or equal to the first threshold.
  • an embodiment of the present invention discloses a picture quality evaluation apparatus, including:
  • a processor coupled to the memory
  • the processor invokes the executable program code stored in the memory to perform all or part of the steps of the first aspect.
  • the first picture is obtained from the video file; secondly, the first picture is preprocessed to obtain a preprocessed picture; and again, the preprocessed picture is performed.
  • Edge detection to count the number N of edge points, the N is a positive integer; when the N is greater than or equal to the first threshold, the first picture is used to determine the target video file type.
  • the solution of the embodiment of the invention improves the efficiency of video format recognition.
  • FIG. 1 is a schematic flowchart of a picture quality evaluation method according to an embodiment of the present invention.
  • FIG. 2 is a schematic diagram of pixel points of a picture
  • FIG. 3 is a schematic diagram of another picture pixel point
  • FIG. 4 is a schematic flowchart diagram of another picture quality evaluation method according to an embodiment of the present disclosure.
  • FIG. 5 is a schematic structural diagram of a picture quality evaluation method according to an embodiment of the present invention.
  • FIG. 6 is a schematic structural diagram showing a partial structure of a picture quality evaluation method according to an embodiment of the present disclosure
  • FIG. 7 is a schematic partial structural diagram of a picture quality evaluation method according to an embodiment of the present invention.
  • FIG. 8 is a schematic structural diagram of another picture quality evaluation method according to an embodiment of the present invention.
  • FIG. 1 is a schematic flowchart diagram of an image quality evaluation method according to an embodiment of the present invention. As shown in Figure 1, the method includes:
  • the picture quality evaluation apparatus acquires the first picture.
  • the first picture is a frame picture in the target video file.
  • the target video file is a video file of a type to be determined.
  • the target video file may be a VR video file, a 3D video file, a 360-degree video file, or other video files.
  • the first picture is a key frame in the target video file.
  • the key frame is the frame in which the key action in the motion or change of the character or object in the target video file is located.
  • the picture quality evaluation apparatus performs preprocessing on the first picture to obtain a preprocessed picture.
  • the pre-processing the first picture to obtain a pre-processed picture includes:
  • performing the resolution processing on the first picture by the picture quality evaluation apparatus is specifically: reducing the resolution of the first picture to a preset value, and using the reduced first picture as the second picture.
  • the preset value may be 640x480, 320x180, 567x390, 626x413 or other values.
  • the above preset value is 320x180.
  • the picture quality evaluation apparatus performs grayscale processing on the second picture, in particular, converting the second picture from a color picture to a gray picture, and using the gray picture as the third picture.
  • the above image quality evaluation apparatus performs histogram equalization processing on the third picture to make The third picture described above changes faster, avoiding that the third picture is a gradation picture and no edge is detected.
  • the picture quality evaluation apparatus performs edge detection on the preprocessed picture to count the number N of edge points, where N is a positive integer.
  • the performing edge detection on the preprocessed picture to count the number N of edge points includes:
  • Edge detection is performed on M pixel points in the preset area of the preprocessed picture to obtain M detection values, and the M detection values are in one-to-one correspondence with the M pixel points;
  • a pixel point corresponding to the second threshold value of the M detection values is used as an edge point to count the number N of edge points, and the M is greater than or equal to N.
  • FIG. 2 is a schematic diagram of pixel points of a preprocessed picture.
  • the black point is the pixel of the preprocessed picture.
  • FIG. 2 there are n columns of pixels on the horizontal axis and m rows of pixels on the vertical axis, and the size of the preprocessed picture may be mxn.
  • the preset region from the m-th row may be between 1 to 2 m-th row region in FIG. 2, FIG. 2 may also be in the region from the first column to the n 1 n 2 between the second column, may also FIG. 2 in between the m-th row to the m-th row 1 and column 2 intersection region between n 1 to n 2 of the second column.
  • the above m 1 is greater than or equal to 0 and less than or equal to m-2, and the above m 2 is greater than or equal to 1 and less than or equal to m-1.
  • the above n 1 is greater than or equal to 0 and less than or equal to n-2, and the above n 2 is greater than or equal to 1 and less than or equal to n-1.
  • the magnitudes of the above m 1 , m 2 , n 1 , and n 2 may be set according to the size of the preprocessed picture.
  • the preset area is the area between the 45th line and the 274th line in FIG. 3, that is, the 45th line and the last number in the picture shown in FIG. The area between 45 lines.
  • the picture quality evaluation apparatus After determining the preset area, the picture quality evaluation apparatus obtains the detection values one by one for the M pixel points in the preset area to obtain M detection values. The image quality evaluation apparatus then compares the M detection values one by one with the second threshold. If the detected value A is greater than the second threshold, the pixel corresponding to the detected value A is taken as an edge point. The detected value A is any one of the M detection values. Finally, the picture quality evaluation device counts the number of edge points to obtain the number N of edge points.
  • performing edge detection on M pixel points in a preset area of the preprocessed picture Testing including:
  • Edge detection is performed on M pixel points in a preset area of the preprocessed picture by a detection operator.
  • the above image quality evaluation device may also pass a Prewitt operator, a Canny operator, a Roberts operator, a Sobel operator, and Krisch.
  • An operator or other operator performs edge detection on M pixels in the preset area of the preprocessed picture.
  • the picture quality evaluation apparatus uses the first picture to determine a target video file type.
  • the method when the N is less than the first threshold, the method includes:
  • the picture quality evaluation apparatus may use the first picture corresponding to the pre-processed picture to confirm the type of the target video file. If it is determined that the above N is smaller than the first threshold, the picture quality evaluation apparatus acquires the fourth picture, and performs the processes described in the above steps S102-S104 again.
  • the fourth picture is a frame picture different from the first picture in the target video file, and the fourth picture is a key frame in the target video file.
  • the value of the first threshold is determined according to the size of the preprocessed picture.
  • the first threshold may be 1280 or other values.
  • the first picture is obtained from the video file; secondly, the first picture is preprocessed to obtain a preprocessed picture; and again, the preprocessed picture is performed.
  • Edge detection to count the number N of edge points, the N is a positive integer; when the N is greater than or equal to the first threshold, the first picture is used to determine the target video file type.
  • the solution of the embodiment of the invention improves the efficiency of video format recognition.
  • FIG. 4 is a flowchart showing another method for evaluating picture quality according to an embodiment of the present invention. intention. As shown in FIG. 4, the method includes:
  • the picture quality evaluation apparatus acquires the first picture.
  • the picture quality evaluation apparatus performs resolution processing on the first picture to obtain a second picture.
  • the second picture of the picture quality evaluation apparatus performs grayscale processing to obtain a third picture.
  • the third picture of the picture quality evaluation apparatus performs histogram equalization processing to obtain a preprocessed picture.
  • the picture quality evaluation apparatus performs edge detection on the M pixel points in the preset area of the preprocessed picture, and acquires M detection values.
  • the picture quality evaluation apparatus determines whether the M pixel points are edge points one by one, and counts the number N of edge points.
  • the picture quality evaluation apparatus determines whether the N is greater than or equal to a first threshold.
  • the picture quality evaluation apparatus performs step S408; otherwise, the picture quality evaluation apparatus performs step S409.
  • the picture quality evaluation apparatus uses the first picture to determine a type of the target video file.
  • the picture quality evaluation apparatus acquires a fourth picture, and performs the above steps S402-S407 again.
  • FIG. 5 is a schematic structural diagram of a picture quality evaluation apparatus according to an embodiment of the present invention. As shown in FIG. 5, the apparatus 500 includes:
  • the first obtaining module 501 is configured to acquire a first picture.
  • the first picture is a frame of pictures in the target video file.
  • the first picture is a key frame in the target video file.
  • the processing module 502 is configured to perform pre-processing on the first picture to obtain a pre-processed picture.
  • processing module 502 includes:
  • the first processing unit 5021 is configured to perform resolution processing on the target image to obtain a second image.
  • a second processing unit 5022 configured to perform grayscale processing on the second picture to obtain a third picture
  • the third processing unit 5023 is configured to perform a histogram equalization process on the third picture to obtain a pre-processed picture.
  • the detecting module 503 is configured to perform edge detection on the preprocessed picture to count the number N of edge points, where N is a positive integer.
  • the detecting module 503 further includes:
  • the detecting unit 5031 is configured to perform edge detection on the M pixel points in the preset area of the preprocessed picture to obtain M detection values, where the M detection values are in one-to-one correspondence with the M pixel points;
  • the statistic unit 5032 is configured to use a pixel point corresponding to the second threshold value of the M detection values as an edge point to count the number N of edge points, where the M is greater than or equal to N.
  • the detecting mode 303 is specifically configured to: perform edge detection on M pixel points in a preset area of the preprocessed picture by using a detection operator.
  • the determining module 504 is configured to use the first picture to determine a target video file type when the N is greater than or equal to the first threshold.
  • the apparatus 500 when the N is less than the first threshold, the apparatus 500 includes:
  • the second obtaining module 505 is configured to obtain a fourth picture, where the fourth picture is a frame picture different from the first picture in the target video file, and the picture quality evaluation operation is performed again based on the fourth picture.
  • each of the above modules (the first obtaining module 501, the processing module 502, the detecting module 503, the determining module 504, and the second acquiring module 505) is configured to execute the related steps of the method for determining the driving trajectory.
  • the “module” in this embodiment may be an application-specific integrated circuit (ASIC), a processor and memory that executes one or more software or firmware programs, integrated logic circuits, and/or others that may provide the above functions.
  • ASIC application-specific integrated circuit
  • the first acquiring module 501, The processing module 502, the detecting module 503, the determining module 504, and the second obtaining module 505 can be implemented by a processor in the apparatus 800 described in FIG.
  • the picture quality evaluation apparatus can be implemented by the structure in FIG.
  • the apparatus 800 includes at least one processor 801, at least one memory 802, and at least one communication interface 803.
  • the device may also include general components such as an antenna, which will not be described in detail herein.
  • the processor 801 can be a general purpose central processing unit (CPU), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits for controlling the execution of the above program.
  • CPU central processing unit
  • ASIC application-specific integrated circuit
  • the communication interface 803 is configured to communicate with other devices or communication networks, such as Ethernet, Radio Access Network (RAN), Wireless Local Area Networks (WLAN), and the like.
  • RAN Radio Access Network
  • WLAN Wireless Local Area Networks
  • the memory 802 can be a read-only memory (ROM) or other type of static storage device that can store static information and instructions, a random access memory (RAM) or other type that can store information and instructions.
  • the dynamic storage device can also be an Electrically Erasable Programmable Read-Only Memory (EEPROM), a Compact Disc Read-Only Memory (CD-ROM) or other optical disc storage, and a disc storage device. (including compact discs, laser discs, optical discs, digital versatile discs, Blu-ray discs, etc.), magnetic disk storage media or other magnetic storage devices, or can be used to carry or store desired program code in the form of instructions or data structures and can be Any other media accessed, but not limited to this.
  • the memory can exist independently and be connected to the processor via a bus.
  • the memory can also be integrated with the processor.
  • the memory 802 is configured to store application code that executes the above solution, and is controlled by the processor 801 for execution.
  • the processor 801 is configured to execute application code stored in the memory 802.
  • the picture quality evaluation apparatus shown in FIG. 8 the code stored in the memory 802 can perform the image quality evaluation method provided above, for example, the picture quality evaluation apparatus acquires the first picture; and preprocesses the first picture to obtain a preprocessed picture; Edge detection is performed on the preprocessed picture to count the number N of edge points, where N is a positive integer; when the N is greater than or equal to the first threshold, the first picture is used to determine a target video file. Types of.
  • the embodiment of the present invention further provides a computer storage medium, wherein the computer storage medium may store a program, and the program includes some or all of the steps of any one of the picture quality evaluation methods described in the foregoing method embodiments.
  • the disclosed apparatus may be implemented in other ways.
  • the device embodiments described above are merely illustrative.
  • the division of the unit is only a logical function division.
  • there may be another division manner for example, multiple units or components may be combined or may be Integrate into another system, or some features can be ignored or not executed.
  • the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, device or unit, and may be electrical or otherwise.
  • the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of the embodiment.
  • each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
  • the above integrated unit can be implemented in the form of hardware or in the form of a software functional unit.
  • the integrated unit if implemented in the form of a software functional unit and sold or used as a standalone product, may be stored in a computer readable memory. Based on such understanding, the technical solution of the present invention may contribute to the prior art or all or part of the technical solution may be embodied in the form of a software product stored in a memory. A number of instructions are included to cause a computer device (which may be a personal computer, server or network device, etc.) to perform all or part of the steps of the methods of the various embodiments of the present invention.
  • the foregoing memory includes: a U disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic disk, or an optical disk, and the like, which can store program codes.
  • ROM Read-Only Memory
  • RAM Random Access Memory

Abstract

A method and device for assessing picture quality. The method comprises: acquiring a first picture (S101); performing preprocessing on the first picture so as to obtain a preprocessed picture (S102); performing edge detection on the preprocessed picture so as to count the number N of edge points, N being a positive integer (S103); and when N is greater than or equal to a first threshold, using the first picture for determining the type of a target video file (S104). The method improves the efficiency of video format recognition.

Description

图片质量评估方法及装置Picture quality evaluation method and device 技术领域Technical field
本发明涉及图像处理领域,尤其涉及一种图片质量评估方法及装置。The present invention relates to the field of image processing, and in particular, to a picture quality evaluation method and apparatus.
背景技术Background technique
近年来,随着虚拟现实(Virtual Reality,VR)技术的发展,并广泛应用于360度视频文件和3D视频文件的播放,丰富了人们的娱乐生活。In recent years, with the development of Virtual Reality (VR) technology, and widely used in the playback of 360-degree video files and 3D video files, it has enriched people's entertainment life.
360度视频文件和3D视频文件等格式的视频文件没有统一的文件标识,很多播放器通过截取视频文件中的图片帧来识别该视频文件是否为360度视频格式或者3D视频格式。但在截取图片帧的过程中,有时候会截取到以纯色、大面积纯色为主或对比度低的图片,这种图片不适合作为识别视频类型的依据,就需要再识别计算后重新截取图片帧再次识别,造成视频格式识别效率的降低。Video files in formats such as 360-degree video files and 3D video files do not have a uniform file identifier. Many players recognize whether the video file is in a 360-degree video format or a 3D video format by intercepting a picture frame in the video file. However, in the process of intercepting the picture frame, sometimes the picture with the solid color, the large area solid color or the low contrast is intercepted. This picture is not suitable as the basis for identifying the video type, and the picture frame needs to be re-interpreted after the recognition calculation. Recognizing again, resulting in a reduction in the efficiency of video format recognition.
发明内容Summary of the invention
本发明实施例公开一种图片质量评估方法及装置,提高了视频格式识别的效率。The embodiment of the invention discloses a picture quality evaluation method and device, which improves the efficiency of video format recognition.
第一方面,本发明实施例公开一种图片质量评估方法,包括:In a first aspect, an embodiment of the present invention discloses a picture quality evaluation method, including:
获取第一图片;Get the first picture;
对所述第一图片进行预处理,得到预处理图片;Performing pre-processing on the first picture to obtain a pre-processed picture;
对所述预处理图片进行边缘检测,以统计边缘点的个数N,所述N为正整数;Performing edge detection on the preprocessed picture to count the number N of edge points, where N is a positive integer;
当所述N大于或等于第一阈值时,将所述第一图片用于确定目标视频文件类型。The first picture is used to determine a target video file type when the N is greater than or equal to a first threshold.
第二方面,本发明实施例公开一种图片质量评估装置,包括:In a second aspect, an embodiment of the present invention discloses a picture quality evaluation apparatus, including:
第一获取模块,用于获取第一图片;a first acquiring module, configured to acquire a first picture;
处理模块,用于对所述第一图片进行预处理,得到预处理图片;a processing module, configured to perform pre-processing on the first picture to obtain a pre-processed picture;
检测模块,用于对所述预处理图片进行边缘检测,以统计边缘点的个数N, 所述N为正整数;a detecting module, configured to perform edge detection on the preprocessed picture to count the number N of edge points, The N is a positive integer;
确定模块,用于当所述N大于或等于第一阈值时,将所述第一图片用于确定目标视频文件类型。And a determining module, configured to use the first picture to determine a target video file type when the N is greater than or equal to the first threshold.
第三方面,本发明实施例公开一种图片质量评估装置,包括:In a third aspect, an embodiment of the present invention discloses a picture quality evaluation apparatus, including:
存储有可执行程序代码的存储器;a memory storing executable program code;
与所述存储器耦合的处理器;a processor coupled to the memory;
所述处理器调用所述存储器中存储的所述可执行程序代码,执行第一方面的全部步骤或者部分步骤。The processor invokes the executable program code stored in the memory to perform all or part of the steps of the first aspect.
可以看出,在本发明实施例的方案中,首先,从视频文件中获取第一图片;其次,对所述第一图片进行预处理,得到预处理图片;再次,对所述预处理图片进行边缘检测,以统计边缘点的个数N,所述N为正整数;最后所述N大于或等于第一阈值时,将所述第一图片用于确定目标视频文件类型。与现有技术相比,本发明实施例的方案提高了视频格式识别的效率。It can be seen that, in the solution of the embodiment of the present invention, first, the first picture is obtained from the video file; secondly, the first picture is preprocessed to obtain a preprocessed picture; and again, the preprocessed picture is performed. Edge detection, to count the number N of edge points, the N is a positive integer; when the N is greater than or equal to the first threshold, the first picture is used to determine the target video file type. Compared with the prior art, the solution of the embodiment of the invention improves the efficiency of video format recognition.
附图说明DRAWINGS
为了更清楚地说明本发明实施例中的技术方案,下面将对实施例中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings to be used in the embodiments will be briefly described below. It is obvious that the drawings in the following description are only some embodiments of the present invention. Those skilled in the art can also obtain other drawings based on these drawings without paying any creative work.
图1为本发明实施例提供的一种图片质量评估方法的流程示意图;1 is a schematic flowchart of a picture quality evaluation method according to an embodiment of the present invention;
图2为图片像素点的示意图;2 is a schematic diagram of pixel points of a picture;
图3为另一图片像素点的示意图;3 is a schematic diagram of another picture pixel point;
图4为本发明实施例提供的另一种图片质量评估方法的流程示意图;FIG. 4 is a schematic flowchart diagram of another picture quality evaluation method according to an embodiment of the present disclosure;
图5为本发明实施例提供的一种图片质量评估方法的结构示意图;FIG. 5 is a schematic structural diagram of a picture quality evaluation method according to an embodiment of the present invention;
图6为本发明实施例提供的一种图片质量评估方法的局部结构示意图;FIG. 6 is a schematic structural diagram showing a partial structure of a picture quality evaluation method according to an embodiment of the present disclosure;
图7为本发明实施例提供的一种图片质量评估方法的局部结构示意图;FIG. 7 is a schematic partial structural diagram of a picture quality evaluation method according to an embodiment of the present invention;
图8为本发明实施例提供的另一种图片质量评估方法的结构示意图。 FIG. 8 is a schematic structural diagram of another picture quality evaluation method according to an embodiment of the present invention.
具体实施方式detailed description
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The technical solutions in the embodiments of the present invention are clearly and completely described in the following with reference to the accompanying drawings in the embodiments of the present invention. It is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative efforts are within the scope of the present invention.
请参阅图1,图1为本发明实施例提供的一种图像质量评估方法的流程示意图。如图1所示,该方法包括:Please refer to FIG. 1. FIG. 1 is a schematic flowchart diagram of an image quality evaluation method according to an embodiment of the present invention. As shown in Figure 1, the method includes:
S101、图片质量评估装置获取第一图片。S101. The picture quality evaluation apparatus acquires the first picture.
其中,所述第一图片为目标视频文件中的一帧图片。该目标视频文件为待确定类型的视频文件。The first picture is a frame picture in the target video file. The target video file is a video file of a type to be determined.
可选地,上述目标视频文件可为VR视频文件、3D视频文件、360度视频文件或者其他视频文件。Optionally, the target video file may be a VR video file, a 3D video file, a 360-degree video file, or other video files.
进一步地,所述第一图片为目标视频文件中的关键帧。该关键帧为上述目标视频文件中的角色或者物体运动或变化中的关键动作所处的那一帧。Further, the first picture is a key frame in the target video file. The key frame is the frame in which the key action in the motion or change of the character or object in the target video file is located.
S102、所述图片质量评估装置对所述第一图片进行预处理,得到预处理图片。S102. The picture quality evaluation apparatus performs preprocessing on the first picture to obtain a preprocessed picture.
其中,所述对所述第一图片进行预处理,得到预处理图片,包括:The pre-processing the first picture to obtain a pre-processed picture includes:
对所述第一图片进行分辨率处理,得到第二图片;Performing resolution processing on the first picture to obtain a second picture;
对所述第二图片进行灰度化处理,得到第三图片;Performing grayscale processing on the second picture to obtain a third picture;
对所述第三图片进行直方图均衡化处理,得到预处理图片。Performing a histogram equalization process on the third picture to obtain a preprocessed picture.
具体地,上述图片质量评估装置对上述第一图片进行分辨率处理具体是将上述第一图片的分辨率降低至预设值,并将降低分辨率后的第一图片作为第二图片。Specifically, performing the resolution processing on the first picture by the picture quality evaluation apparatus is specifically: reducing the resolution of the first picture to a preset value, and using the reduced first picture as the second picture.
可选地,上述预设值可为640x480、320x180、567x390、626x413或者其他值。优选地,上述预设值为320x180。Optionally, the preset value may be 640x480, 320x180, 567x390, 626x413 or other values. Preferably, the above preset value is 320x180.
具体地,上述图片质量评估装置对上述第二图片进行灰度化处理具体是将上述第二图片由彩色图片转换为灰度图片,并将该灰度图片作为第三图片。Specifically, the picture quality evaluation apparatus performs grayscale processing on the second picture, in particular, converting the second picture from a color picture to a gray picture, and using the gray picture as the third picture.
上述图像质量评估装置对上述第三图片进行直方图均衡化处理目的是使 上述第三图片变化得更快,避免上述第三图片是渐变图片而检测不到边缘。The above image quality evaluation apparatus performs histogram equalization processing on the third picture to make The third picture described above changes faster, avoiding that the third picture is a gradation picture and no edge is detected.
S103、所述图片质量评估装置对所述预处理图片进行边缘检测,以统计边缘点的个数N,所述N为正整数。S103. The picture quality evaluation apparatus performs edge detection on the preprocessed picture to count the number N of edge points, where N is a positive integer.
其中,所述对所述预处理图片进行边缘检测,以统计边缘点的个数N,包括:The performing edge detection on the preprocessed picture to count the number N of edge points includes:
对所述预处理图片的预设区域内的M个像素点进行边缘检测,得到M个检测值,所述M个检测值与所述M个像素点一一对应;Edge detection is performed on M pixel points in the preset area of the preprocessed picture to obtain M detection values, and the M detection values are in one-to-one correspondence with the M pixel points;
将所述M个检测值中大于或等于第二阈值对应的像素点作为边缘点,以统计边缘点的个数N,所述M大于或等于N。A pixel point corresponding to the second threshold value of the M detection values is used as an edge point to count the number N of edge points, and the M is greater than or equal to N.
举例说明上述预设区域,参见图2,假设图2为预处理图片的像素点示意图。其中的黑点为该预处理图片的像素点,图2中横轴上有n列像素点,纵轴上有m行像素点,则上述预处理图片的尺寸可以mxn。上述预设区域可为图2中从第m1行到第m2行之间的区域,也可为图2中从第n1列到第n2列之间的区域,还可为图2中第m1行到第m2行之间和第n1列到第n2列之间的交叉区域。For example, the preset area mentioned above is referred to FIG. 2, and FIG. 2 is a schematic diagram of pixel points of a preprocessed picture. The black point is the pixel of the preprocessed picture. In FIG. 2, there are n columns of pixels on the horizontal axis and m rows of pixels on the vertical axis, and the size of the preprocessed picture may be mxn. The preset region from the m-th row may be between 1 to 2 m-th row region in FIG. 2, FIG. 2 may also be in the region from the first column to the n 1 n 2 between the second column, may also FIG. 2 in between the m-th row to the m-th row 1 and column 2 intersection region between n 1 to n 2 of the second column.
其中,上述m1大于或者等于0且小于或等于m-2,上述m2大于或者等于1且小于或等于m-1。上述n1大于或等于0且小于或等于n-2,上述n2大于或等于1且小于或等于n-1。Wherein, the above m 1 is greater than or equal to 0 and less than or equal to m-2, and the above m 2 is greater than or equal to 1 and less than or equal to m-1. The above n 1 is greater than or equal to 0 and less than or equal to n-2, and the above n 2 is greater than or equal to 1 and less than or equal to n-1.
上述m1、m2、n1、n2的取值大小可根据上述预处理图片的尺寸进行设置。The magnitudes of the above m 1 , m 2 , n 1 , and n 2 may be set according to the size of the preprocessed picture.
参见图3,假设上述预处理图片的尺寸为320x180,则上述预设区域为图3中第45行到第274行之间的区域,即为图3所示的图片中第45行和倒数第45行之间的区域。Referring to FIG. 3, assuming that the size of the preprocessed picture is 320x180, the preset area is the area between the 45th line and the 274th line in FIG. 3, that is, the 45th line and the last number in the picture shown in FIG. The area between 45 lines.
上述图片质量评估装置确定预设区域后,对该预设区域内的M个像素点逐个获取检测值,以得到M个检测值。然后上述图像质量评估装置将M个检测值逐个与第二阈值进行比较。若检测值A大于第二阈值,则将检测值A对应的像素点作为边缘点。上述检测值A为上述M个检测值中的任意一个。最后,上述图片质量评估装置统计边缘点的个数,得到边缘点的个数N。After determining the preset area, the picture quality evaluation apparatus obtains the detection values one by one for the M pixel points in the preset area to obtain M detection values. The image quality evaluation apparatus then compares the M detection values one by one with the second threshold. If the detected value A is greater than the second threshold, the pixel corresponding to the detected value A is taken as an edge point. The detected value A is any one of the M detection values. Finally, the picture quality evaluation device counts the number of edge points to obtain the number N of edge points.
可选地,所述对所述预处理图片的预设区域内的M个像素点进行边缘检 测,包括:Optionally, performing edge detection on M pixel points in a preset area of the preprocessed picture Testing, including:
通过检测算子对所述预处理图片的预设区域内的M个像素点进行边缘检测。Edge detection is performed on M pixel points in a preset area of the preprocessed picture by a detection operator.
可选地,上述图像质量评估装置还可通过普瑞维特(Prewitt)算子、坎尼(Canny)算子、罗伯特(Roberts)算子、索伯尔(Sobel)算子、克瑞斯(Krisch)算子或者其他算子对上述预处理图片的预设区域内的M个像素点进行边缘检测。Optionally, the above image quality evaluation device may also pass a Prewitt operator, a Canny operator, a Roberts operator, a Sobel operator, and Krisch. An operator or other operator performs edge detection on M pixels in the preset area of the preprocessed picture.
S104、当所述N大于或等于第一阈值时,所述图片质量评估装置将所述第一图片用于确定目标视频文件类型。S104. When the N is greater than or equal to the first threshold, the picture quality evaluation apparatus uses the first picture to determine a target video file type.
可选地,当所述N小于第一阈值时,所述方法包括:Optionally, when the N is less than the first threshold, the method includes:
获取第四图片,所述第四图片为所述目标视频文件中不同于所述第一图片的一帧图片;Obtaining a fourth picture, where the fourth picture is a frame picture different from the first picture in the target video file;
基于所述第四图片重新进行图片质量评估操作。Performing a picture quality evaluation operation based on the fourth picture.
具体地,上述图片质量评估装置获取上述预处理图片的边缘点的个数N后,确定上述N是否大于或等于上述第一阈值。若确定上述N大于或等于上述第一阈值,则上述图片质量评估装置可将上述预处理图片对应的第一图用于确认上述目标视频文件的类型。若确定上述N小于上述第一阈值,则上述图片质量评估装置获取第四图片,并重新进行上述步骤S102-S104所述的过程。上述第四图片为上述目标视频文件中不同于上述第一图片的一帧图片,且该第四图片为上述目标视频文件中的关键帧。Specifically, after the picture quality evaluation device acquires the number N of edge points of the preprocessed picture, it is determined whether the N is greater than or equal to the first threshold. If it is determined that the N is greater than or equal to the first threshold, the picture quality evaluation apparatus may use the first picture corresponding to the pre-processed picture to confirm the type of the target video file. If it is determined that the above N is smaller than the first threshold, the picture quality evaluation apparatus acquires the fourth picture, and performs the processes described in the above steps S102-S104 again. The fourth picture is a frame picture different from the first picture in the target video file, and the fourth picture is a key frame in the target video file.
其中,上述第一阈值的取值根据上述预处理图片的尺寸大小来确定。The value of the first threshold is determined according to the size of the preprocessed picture.
可选地,上述第一阈值可为1280或者其他值。Optionally, the first threshold may be 1280 or other values.
可以看出,在本发明实施例的方案中,首先,从视频文件中获取第一图片;其次,对所述第一图片进行预处理,得到预处理图片;再次,对所述预处理图片进行边缘检测,以统计边缘点的个数N,所述N为正整数;最后所述N大于或等于第一阈值时,将所述第一图片用于确定目标视频文件类型。与现有技术相比,本发明实施例的方案提高了视频格式识别的效率。It can be seen that, in the solution of the embodiment of the present invention, first, the first picture is obtained from the video file; secondly, the first picture is preprocessed to obtain a preprocessed picture; and again, the preprocessed picture is performed. Edge detection, to count the number N of edge points, the N is a positive integer; when the N is greater than or equal to the first threshold, the first picture is used to determine the target video file type. Compared with the prior art, the solution of the embodiment of the invention improves the efficiency of video format recognition.
参见图4,图4为本发明实施例提供的另一种图片质量评估方法的流程示 意图。如图4所示,该方法包括:Referring to FIG. 4, FIG. 4 is a flowchart showing another method for evaluating picture quality according to an embodiment of the present invention. intention. As shown in FIG. 4, the method includes:
S401、图片质量评估装置获取第一图片。S401. The picture quality evaluation apparatus acquires the first picture.
S402、所述图片质量评估装置对所述第一图片进行分辨率处理,得到第二图片。S402. The picture quality evaluation apparatus performs resolution processing on the first picture to obtain a second picture.
S403、所述图片质量评估装置所述第二图片进行灰度化处理,得到第三图片。S403. The second picture of the picture quality evaluation apparatus performs grayscale processing to obtain a third picture.
S404、所述图片质量评估装置所述第三图片进行直方图均衡化处理,得到预处理图片。S404. The third picture of the picture quality evaluation apparatus performs histogram equalization processing to obtain a preprocessed picture.
S405、所述图片质量评估装置对所述预处理图片的预设区域中的M个像素点进行边缘检测,获取M个检测值。S405. The picture quality evaluation apparatus performs edge detection on the M pixel points in the preset area of the preprocessed picture, and acquires M detection values.
S406、所述图片质量评估装置对所述M个像素点逐个进行判断是否为边缘点,并统计边缘点的个数N。S406. The picture quality evaluation apparatus determines whether the M pixel points are edge points one by one, and counts the number N of edge points.
S407、所述图片质量评估装置确定所述N是否大于或等于第一阈值。S407. The picture quality evaluation apparatus determines whether the N is greater than or equal to a first threshold.
其中,若确定所述N大于或等于所述第一阈值,所述图片质量评估装置执行步骤S408;反之,所述图片质量评估装置执行步骤S409。If it is determined that the N is greater than or equal to the first threshold, the picture quality evaluation apparatus performs step S408; otherwise, the picture quality evaluation apparatus performs step S409.
S408、图片质量评估装置将所述第一图片用于确定所述目标视频文件的类型。S408. The picture quality evaluation apparatus uses the first picture to determine a type of the target video file.
S409、所述图片质量评估装置获取第四图片,并重新执行上述步骤S402-S407。S409. The picture quality evaluation apparatus acquires a fourth picture, and performs the above steps S402-S407 again.
需要说明的是,上述步骤S401-S409的描述可参见上述步骤S101-S104的相关描述,在此不再叙述。It should be noted that the description of the above steps S401-S409 can be referred to the related description of the above steps S101-S104, and will not be described here.
参见图5,图5为本发明实施例提供的一种图片质量评估装置的结构示意图。如图5所示,该装置500包括:Referring to FIG. 5, FIG. 5 is a schematic structural diagram of a picture quality evaluation apparatus according to an embodiment of the present invention. As shown in FIG. 5, the apparatus 500 includes:
第一获取模块501,用于获取第一图片。The first obtaining module 501 is configured to acquire a first picture.
可选地,所述第一图片为目标视频文件中的一帧图片。Optionally, the first picture is a frame of pictures in the target video file.
可选地,所述第一图片为目标视频文件中的关键帧。Optionally, the first picture is a key frame in the target video file.
处理模块502,用于对所述第一图片进行预处理,得到预处理图片。 The processing module 502 is configured to perform pre-processing on the first picture to obtain a pre-processed picture.
可选地,所述处理模块502包括:Optionally, the processing module 502 includes:
第一处理单元5021,用于对所述目标图片进行分辨率处理,得到第二图片;The first processing unit 5021 is configured to perform resolution processing on the target image to obtain a second image.
第二处理单元5022,用于对所述第二图片进行灰度化处理,得到第三图片;a second processing unit 5022, configured to perform grayscale processing on the second picture to obtain a third picture;
第三处理单元5023,用于对所述第三图片进行直方图均衡化处理,得到预处理图片。The third processing unit 5023 is configured to perform a histogram equalization process on the third picture to obtain a pre-processed picture.
检测模块503,用于对所述预处理图片进行边缘检测,以统计边缘点的个数N,所述N为正整数。The detecting module 503 is configured to perform edge detection on the preprocessed picture to count the number N of edge points, where N is a positive integer.
可选地,,所述检测模块503还包括:Optionally, the detecting module 503 further includes:
检测单元5031,用于对所述预处理图片的预设区域内的M个像素点进行边缘检测,得到M个检测值,所述M个检测值与所述M个像素点一一对应;The detecting unit 5031 is configured to perform edge detection on the M pixel points in the preset area of the preprocessed picture to obtain M detection values, where the M detection values are in one-to-one correspondence with the M pixel points;
统计单元5032,用于将所述M个检测值中大于或等于第二阈值对应的像素点作为边缘点,以统计边缘点的个数N,所述M大于或等于N。The statistic unit 5032 is configured to use a pixel point corresponding to the second threshold value of the M detection values as an edge point to count the number N of edge points, where the M is greater than or equal to N.
可选地,所述检测模303具体用于:通过检测算子对所述预处理图片的预设区域内的M个像素点进行边缘检测。Optionally, the detecting mode 303 is specifically configured to: perform edge detection on M pixel points in a preset area of the preprocessed picture by using a detection operator.
确定模块504,用于当所述N大于或等于第一阈值时,将所述第一图片用于确定目标视频文件类型。The determining module 504 is configured to use the first picture to determine a target video file type when the N is greater than or equal to the first threshold.
其中,当所述N小于第一阈值时,所述装置500包括:Wherein, when the N is less than the first threshold, the apparatus 500 includes:
第二获取模块505,用于获取第四图片,所述第四图片为所述目标视频文件中不同于所述第一图片的一帧图片并基于所述第四图片重新进行图片质量评估操作。The second obtaining module 505 is configured to obtain a fourth picture, where the fourth picture is a frame picture different from the first picture in the target video file, and the picture quality evaluation operation is performed again based on the fourth picture.
需要说明的是,上述各模块(第一获取模块501、处理模块502、检测模块503、确定模块504、第二获取模块505)用于执行上述行车轨迹的确定方法的相关步骤。It should be noted that each of the above modules (the first obtaining module 501, the processing module 502, the detecting module 503, the determining module 504, and the second acquiring module 505) is configured to execute the related steps of the method for determining the driving trajectory.
本实施例中的“模块”可是指定应用集成电路(application-specific integrated circuit,ASIC),执行一个或多个软件或固件程序的处理器和存储器,集成逻辑电路,和/或其他可以提供上述功能的器件。此外,上述第一获取模块501、 处理模块502、检测模块503、确定模块504、第二获取模块505可通过图8所述的装置800中的处理器来实现。The "module" in this embodiment may be an application-specific integrated circuit (ASIC), a processor and memory that executes one or more software or firmware programs, integrated logic circuits, and/or others that may provide the above functions. Device. In addition, the first acquiring module 501, The processing module 502, the detecting module 503, the determining module 504, and the second obtaining module 505 can be implemented by a processor in the apparatus 800 described in FIG.
如图8所示,图片质量评估装置可以以图8中的结构来实现。该装置800包括至少一个处理器801,至少一个存储器802、至少一个通信接口803。此外,该装置还可以包括天线等通用部件,在此不再详述。As shown in FIG. 8, the picture quality evaluation apparatus can be implemented by the structure in FIG. The apparatus 800 includes at least one processor 801, at least one memory 802, and at least one communication interface 803. In addition, the device may also include general components such as an antenna, which will not be described in detail herein.
处理器801可以是通用中央处理器(CPU),微处理器,特定应用集成电路(application-specific integrated circuit,ASIC),或一个或多个用于控制以上方案程序执行的集成电路。The processor 801 can be a general purpose central processing unit (CPU), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits for controlling the execution of the above program.
通信接口803,用于与其他设备或通信网络通信,如以太网,无线接入网(RAN),无线局域网(Wireless Local Area Networks,WLAN)等。The communication interface 803 is configured to communicate with other devices or communication networks, such as Ethernet, Radio Access Network (RAN), Wireless Local Area Networks (WLAN), and the like.
存储器802可以是只读存储器(read-only memory,ROM)或可存储静态信息和指令的其他类型的静态存储设备,随机存取存储器(random access memory,RAM)或者可存储信息和指令的其他类型的动态存储设备,也可以是电可擦可编程只读存储器(Electrically Erasable Programmable Read-Only Memory,EEPROM)、只读光盘(Compact Disc Read-Only Memory,CD-ROM)或其他光盘存储、光碟存储(包括压缩光碟、激光碟、光碟、数字通用光碟、蓝光光碟等)、磁盘存储介质或者其他磁存储设备、或者能够用于携带或存储具有指令或数据结构形式的期望的程序代码并能够由计算机存取的任何其他介质,但不限于此。存储器可以是独立存在,通过总线与处理器相连接。存储器也可以和处理器集成在一起。The memory 802 can be a read-only memory (ROM) or other type of static storage device that can store static information and instructions, a random access memory (RAM) or other type that can store information and instructions. The dynamic storage device can also be an Electrically Erasable Programmable Read-Only Memory (EEPROM), a Compact Disc Read-Only Memory (CD-ROM) or other optical disc storage, and a disc storage device. (including compact discs, laser discs, optical discs, digital versatile discs, Blu-ray discs, etc.), magnetic disk storage media or other magnetic storage devices, or can be used to carry or store desired program code in the form of instructions or data structures and can be Any other media accessed, but not limited to this. The memory can exist independently and be connected to the processor via a bus. The memory can also be integrated with the processor.
其中,所述存储器802用于存储执行以上方案的应用程序代码,并由处理器801来控制执行。所述处理器801用于执行所述存储器802中存储的应用程序代码。The memory 802 is configured to store application code that executes the above solution, and is controlled by the processor 801 for execution. The processor 801 is configured to execute application code stored in the memory 802.
图8所示的图片质量评估装置,存储器802存储的代码可执行以上提供的图像质量评估方法,比如图片质量评估装置获取第一图片;对所述第一图片进行预处理,得到预处理图片;对所述预处理图片进行边缘检测,以统计边缘点的个数N,所述N为正整数;当所述N大于或等于第一阈值时,将所述第一图片用于确定目标视频文件类型。 The picture quality evaluation apparatus shown in FIG. 8 , the code stored in the memory 802 can perform the image quality evaluation method provided above, for example, the picture quality evaluation apparatus acquires the first picture; and preprocesses the first picture to obtain a preprocessed picture; Edge detection is performed on the preprocessed picture to count the number N of edge points, where N is a positive integer; when the N is greater than or equal to the first threshold, the first picture is used to determine a target video file. Types of.
本发明实施例还提供一种计算机存储介质,其中,该计算机存储介质可存储有程序,该程序执行时包括上述方法实施例中记载的任何一种图片质量评估方法的部分或全部步骤。The embodiment of the present invention further provides a computer storage medium, wherein the computer storage medium may store a program, and the program includes some or all of the steps of any one of the picture quality evaluation methods described in the foregoing method embodiments.
需要说明的是,对于前述的各方法实施例,为了简单描述,故将其都表述为一系列的动作组合,但是本领域技术人员应该知悉,本发明并不受所描述的动作顺序的限制,因为依据本发明,某些步骤可以采用其他顺序或者同时进行。其次,本领域技术人员也应该知悉,说明书中所描述的实施例均属于优选实施例,所涉及的动作和模块并不一定是本发明所必须的。It should be noted that, for the foregoing method embodiments, for the sake of simple description, they are all expressed as a series of action combinations, but those skilled in the art should understand that the present invention is not limited by the described action sequence. Because certain steps may be performed in other sequences or concurrently in accordance with the present invention. In addition, those skilled in the art should also understand that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present invention.
在上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述的部分,可以参见其他实施例的相关描述。In the above embodiments, the descriptions of the various embodiments are different, and the details that are not detailed in a certain embodiment can be referred to the related descriptions of other embodiments.
在本申请所提供的几个实施例中,应该理解到,所揭露的装置,可通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性或其它的形式。In the several embodiments provided herein, it should be understood that the disclosed apparatus may be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the unit is only a logical function division. In actual implementation, there may be another division manner, for example, multiple units or components may be combined or may be Integrate into another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, device or unit, and may be electrical or otherwise.
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of the embodiment.
另外,在本发明各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above integrated unit can be implemented in the form of hardware or in the form of a software functional unit.
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储器中。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储器 中,包括若干指令用以使得一台计算机设备(可为个人计算机、服务器或者网络设备等)执行本发明各个实施例所述方法的全部或部分步骤。而前述的存储器包括:U盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、移动硬盘、磁碟或者光盘等各种可以存储程序代码的介质。The integrated unit, if implemented in the form of a software functional unit and sold or used as a standalone product, may be stored in a computer readable memory. Based on such understanding, the technical solution of the present invention may contribute to the prior art or all or part of the technical solution may be embodied in the form of a software product stored in a memory. A number of instructions are included to cause a computer device (which may be a personal computer, server or network device, etc.) to perform all or part of the steps of the methods of the various embodiments of the present invention. The foregoing memory includes: a U disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic disk, or an optical disk, and the like, which can store program codes.
本领域普通技术人员可以理解上述实施例的各种方法中的全部或部分步骤是可以通过程序来指令相关的硬件来完成,该程序可以存储于一计算机可读存储器中,存储器可以包括:闪存盘、只读存储器(英文:Read-Only Memory,简称:ROM)、随机存取器(英文:Random Access Memory,简称:RAM)、磁盘或光盘等。A person skilled in the art can understand that all or part of the steps of the foregoing embodiments can be completed by a program to instruct related hardware, and the program can be stored in a computer readable memory, and the memory can include: a flash drive , read-only memory (English: Read-Only Memory, referred to as: ROM), random accessor (English: Random Access Memory, referred to as: RAM), disk or CD.
以上对本发明实施例进行了详细介绍,本文中应用了具体个例对本发明的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本发明的方法及其核心思想;同时,对于本领域的一般技术人员,依据本发明的思想,在具体实施方式及应用范围上均会有改变之处,综上上述,本说明书内容不应理解为对本发明的限制。 The embodiments of the present invention have been described in detail above, and the principles and implementations of the present invention are described in detail herein. The description of the above embodiments is only for helping to understand the method of the present invention and its core ideas; The present invention is not limited by the scope of the present invention, and the present invention is not limited by the scope of the present invention.

Claims (15)

  1. 一种图片质量评估方法,其特征在于,包括:A picture quality evaluation method, characterized in that it comprises:
    获取第一图片;Get the first picture;
    对所述第一图片进行预处理,得到预处理图片;Performing pre-processing on the first picture to obtain a pre-processed picture;
    对所述预处理图片进行边缘检测,以统计边缘点的个数N,所述N为正整数;Performing edge detection on the preprocessed picture to count the number N of edge points, where N is a positive integer;
    当所述N大于或等于第一阈值时,将所述第一图片用于确定目标视频文件类型。The first picture is used to determine a target video file type when the N is greater than or equal to a first threshold.
  2. 根据权利要求1所述的方法,其特征在于,所述第一图片为所述目标视频文件中的一帧图片。The method according to claim 1, wherein the first picture is a frame picture in the target video file.
  3. 根据权利要求2所述的方法,其特征在于,所述第一图片为所述目标视频文件中的关键帧。The method of claim 2 wherein said first picture is a key frame in said target video file.
  4. 根据权利要求1-3任一项所述的方法,其特征在于,所述对所述第一图片进行预处理,得到预处理图片,包括:The method according to any one of claims 1-3, wherein the pre-processing the first picture to obtain a pre-processed picture comprises:
    对所述第一图片进行分辨率处理,得到第二图片;Performing resolution processing on the first picture to obtain a second picture;
    对所述第二图片进行灰度化处理,得到第三图片;Performing grayscale processing on the second picture to obtain a third picture;
    对所述第三图片进行直方图均衡化处理,得到预处理图片。Performing a histogram equalization process on the third picture to obtain a preprocessed picture.
  5. 根据权利要求4所述的方法,其特征在于,所述对所述预处理图片进行边缘检测,以统计边缘点的个数N,包括:The method according to claim 4, wherein the performing edge detection on the preprocessed picture to count the number N of edge points comprises:
    对所述预处理图片的预设区域内的M个像素点进行边缘检测,得到M个检测值,所述M个检测值与所述M个像素点一一对应;Edge detection is performed on M pixel points in the preset area of the preprocessed picture to obtain M detection values, and the M detection values are in one-to-one correspondence with the M pixel points;
    将所述M个检测值中大于或等于第二阈值对应的像素点作为边缘点,以统计边缘点的个数N,所述M大于或等于N。A pixel point corresponding to the second threshold value of the M detection values is used as an edge point to count the number N of edge points, and the M is greater than or equal to N.
  6. 根据权利要求4所述的方法,其特征在于,所述对所述预处理图片的预设区域内的M个像素点进行边缘检测,包括:The method according to claim 4, wherein the performing edge detection on the M pixels in the preset area of the preprocessed picture comprises:
    通过检测算子对所述预处理图片的预设区域内的M个像素点进行边缘检测。Edge detection is performed on M pixel points in a preset area of the preprocessed picture by a detection operator.
  7. 根据权利6所述的方法,其特征在于,当所述N小于第一阈值时,所 述方法包括:The method of claim 6 wherein when said N is less than the first threshold, The methods include:
    获取第四图片,所述第四图片为所述目标视频文件中不同于所述第一图片的一帧图片;Obtaining a fourth picture, where the fourth picture is a frame picture different from the first picture in the target video file;
    基于所述第四图片重新进行图片质量评估操作。Performing a picture quality evaluation operation based on the fourth picture.
  8. 一种图片质量评估装置,其特征在于,包括:A picture quality evaluation device, comprising:
    第一获取模块,用于获取第一图片;a first acquiring module, configured to acquire a first picture;
    处理模块,用于对所述第一图片进行预处理,得到预处理图片;a processing module, configured to perform pre-processing on the first picture to obtain a pre-processed picture;
    检测模块,用于对所述预处理图片进行边缘检测,以统计边缘点的个数N,所述N为正整数;a detecting module, configured to perform edge detection on the preprocessed picture to count the number N of edge points, where N is a positive integer;
    确定模块,用于当所述N大于或等于第一阈值时,将所述第一图片用于确定目标视频文件类型。And a determining module, configured to use the first picture to determine a target video file type when the N is greater than or equal to the first threshold.
  9. 根据权利要求8所述的装置,其特征在于,所述第一图片为所述目标视频文件中的一帧图片。The apparatus according to claim 8, wherein the first picture is a frame picture in the target video file.
  10. 根据权利要求9所述的装置,其特征在于,所述第一图片为所述目标视频文件中的关键帧。The apparatus of claim 9, wherein the first picture is a key frame in the target video file.
  11. 根据权利要求8-10任一项所述的装置,其特征在于,所述处理模块包括:The apparatus according to any one of claims 8 to 10, wherein the processing module comprises:
    第一处理单元,用于对所述第一图片进行分辨率处理,得到第二图片;a first processing unit, configured to perform resolution processing on the first picture to obtain a second picture;
    第二处理单元,用于对所述第二图片进行灰度化处理,得到第三图片;a second processing unit, configured to perform grayscale processing on the second image to obtain a third image;
    第三处理单元,用于对所述第三图片进行直方图均衡化处理,得到预处理图片。And a third processing unit, configured to perform a histogram equalization process on the third picture to obtain a pre-processed picture.
  12. 根据权利要求11所述的装置,其特征在于,所述检测模块包括:The device according to claim 11, wherein the detecting module comprises:
    检测单元,用于对所述预处理图片的预设区域内的M个像素点进行边缘检测,得到M个检测值,所述M个检测值与所述M个像素点一一对应;The detecting unit is configured to perform edge detection on the M pixels in the preset area of the preprocessed picture to obtain M detection values, where the M detection values are in one-to-one correspondence with the M pixel points;
    统计单元,用于将所述M个检测值中大于或等于第二阈值对应的像素点作为边缘点,以统计边缘点的个数N,所述M大于或等于N。And a statistical unit, configured to use, as an edge point, a pixel point corresponding to the second threshold value of the M detection values, to count the number N of edge points, where the M is greater than or equal to N.
  13. 根据权利要求11所述的装置,其特征在于,所述检测模具体用于:The device according to claim 11, wherein said detecting mold body is for:
    通过检测算子对所述预处理图片的预设区域内的M个像素点进行边缘检测。 Edge detection is performed on M pixel points in a preset area of the preprocessed picture by a detection operator.
  14. 根据权利13所述的装置,其特征在于,当所述N小于第一阈值时,所述装置包括:The device according to claim 13, wherein when the N is smaller than the first threshold, the device comprises:
    第二获取模块,用于获取第四图片,所述第四图片为所述目标视频文件中不同于所述第一图片的一帧图片并基于所述第四图片重新进行图片质量评估操作。a second acquiring module, configured to acquire a fourth picture, where the fourth picture is a frame picture different from the first picture in the target video file, and the picture quality evaluation operation is performed again based on the fourth picture.
  15. 一种图片质量评估装置,其特征在于,包括:A picture quality evaluation device, comprising:
    存储有可执行程序代码的存储器;a memory storing executable program code;
    与所述存储器耦合的处理器;a processor coupled to the memory;
    所述处理器调用所述存储器中存储的所述可执行程序代码,执行权利要求1-7所述的方法。 The processor invokes the executable program code stored in the memory to perform the method of claims 1-7.
PCT/CN2017/079975 2017-04-10 2017-04-10 Method and device for assessing picture quality WO2018187917A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/CN2017/079975 WO2018187917A1 (en) 2017-04-10 2017-04-10 Method and device for assessing picture quality
CN201780004630.8A CN108475430B (en) 2017-04-10 2017-04-10 Picture quality evaluation method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2017/079975 WO2018187917A1 (en) 2017-04-10 2017-04-10 Method and device for assessing picture quality

Publications (1)

Publication Number Publication Date
WO2018187917A1 true WO2018187917A1 (en) 2018-10-18

Family

ID=63266546

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/079975 WO2018187917A1 (en) 2017-04-10 2017-04-10 Method and device for assessing picture quality

Country Status (2)

Country Link
CN (1) CN108475430B (en)
WO (1) WO2018187917A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116630307A (en) * 2023-07-20 2023-08-22 济宁市华祥石墨制品有限公司 Graphite towbar polishing quality evaluation system, device and computer readable storage medium

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109272498B (en) * 2018-09-20 2021-11-23 易诚高科(大连)科技有限公司 Real-time detail automatic analysis method for dead leaf graph card video

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102075786A (en) * 2011-01-19 2011-05-25 宁波大学 Method for objectively evaluating image quality
CN103065300A (en) * 2012-12-24 2013-04-24 安科智慧城市技术(中国)有限公司 Method for video labeling and device for video labeling
CN103262096A (en) * 2010-12-09 2013-08-21 诺基亚公司 Limited-context-ased identifying key frame from video sequence
CN103269436A (en) * 2013-05-20 2013-08-28 山东大学 Key frame selection method in 2D-3D video conversion

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7612832B2 (en) * 2005-03-29 2009-11-03 Microsoft Corporation Method and system for video clip compression
CN102202227B (en) * 2011-06-21 2013-02-20 珠海世纪鼎利通信科技股份有限公司 No-reference objective video quality assessment method
CN104504717B (en) * 2014-12-31 2017-10-27 北京奇艺世纪科技有限公司 A kind of image information detecting method and device
CN104822069B (en) * 2015-04-30 2018-09-28 北京爱奇艺科技有限公司 A kind of image information detecting method and device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103262096A (en) * 2010-12-09 2013-08-21 诺基亚公司 Limited-context-ased identifying key frame from video sequence
CN102075786A (en) * 2011-01-19 2011-05-25 宁波大学 Method for objectively evaluating image quality
CN103065300A (en) * 2012-12-24 2013-04-24 安科智慧城市技术(中国)有限公司 Method for video labeling and device for video labeling
CN103269436A (en) * 2013-05-20 2013-08-28 山东大学 Key frame selection method in 2D-3D video conversion

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116630307A (en) * 2023-07-20 2023-08-22 济宁市华祥石墨制品有限公司 Graphite towbar polishing quality evaluation system, device and computer readable storage medium
CN116630307B (en) * 2023-07-20 2023-09-19 济宁市华祥石墨制品有限公司 Graphite towbar polishing quality evaluation system, device and computer readable storage medium

Also Published As

Publication number Publication date
CN108475430A (en) 2018-08-31
CN108475430B (en) 2022-01-28

Similar Documents

Publication Publication Date Title
WO2019134504A1 (en) Method and device for blurring image background, storage medium, and electronic apparatus
CN112308095A (en) Picture preprocessing and model training method and device, server and storage medium
US11600008B2 (en) Human-tracking methods, systems, and storage media
US20190095741A1 (en) Region-of-interest detection apparatus, region-of-interest detection method, and recording medium
WO2014044158A1 (en) Identification method and device for target object in image
CN110147465A (en) Image processing method, device, equipment and medium
CN110390327B (en) Foreground extraction method and device, computer equipment and storage medium
WO2022062772A1 (en) Image detection method and apparatus, and computer device and computer-readable storage medium
WO2018187917A1 (en) Method and device for assessing picture quality
WO2024001000A1 (en) Video playing detection method and system
US10395373B1 (en) Image feature detection
CN112163544A (en) Method and system for judging random placement of non-motor vehicles
CN111031359B (en) Video playing method and device, electronic equipment and computer readable storage medium
US11348254B2 (en) Visual search method, computer device, and storage medium
CN112070792B (en) Edge growth connection method and device for image segmentation
JP7014005B2 (en) Image processing equipment and methods, electronic devices
US9836823B2 (en) Method and device for enhancing edge of image and digital camera
EP3817392A1 (en) Video jitter detection method and apparatus
WO2018187939A1 (en) Method for identifying three-dimensional image, and terminal
CN113191210A (en) Image processing method, device and equipment
CN114677319A (en) Stem cell distribution determination method and device, electronic equipment and storage medium
CN113875247A (en) High dynamic range video format detection
CN113117341B (en) Picture processing method and device, computer readable storage medium and electronic equipment
JP2020042338A (en) Selection method, and selection program
CN113724225B (en) Method and device for determining transmission quality of application program

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: 17905365

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 21.02.2020)

122 Ep: pct application non-entry in european phase

Ref document number: 17905365

Country of ref document: EP

Kind code of ref document: A1