CN106791384A - The method and system of camera picture treatment in a kind of Windows systems - Google Patents
The method and system of camera picture treatment in a kind of Windows systems Download PDFInfo
- Publication number
- CN106791384A CN106791384A CN201611125261.1A CN201611125261A CN106791384A CN 106791384 A CN106791384 A CN 106791384A CN 201611125261 A CN201611125261 A CN 201611125261A CN 106791384 A CN106791384 A CN 106791384A
- Authority
- CN
- China
- Prior art keywords
- picture
- camera
- pixel
- windows systems
- interfaces
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N23/00—Cameras or camera modules comprising electronic image sensors; Control thereof
- H04N23/60—Control of cameras or camera modules
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N23/00—Cameras or camera modules comprising electronic image sensors; Control thereof
- H04N23/70—Circuitry for compensating brightness variation in the scene
- H04N23/76—Circuitry for compensating brightness variation in the scene by influencing the image signals
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N23/00—Cameras or camera modules comprising electronic image sensors; Control thereof
- H04N23/80—Camera processing pipelines; Components thereof
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/47—End-user applications
- H04N21/472—End-user interface for requesting content, additional data or services; End-user interface for interacting with content, e.g. for content reservation or setting reminders, for requesting event notification, for manipulating displayed content
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Image Processing (AREA)
Abstract
The present invention relates to image processing field, the method for disclosing camera picture treatment in a kind of Windows systems, including step S1:All camera titles in the list of devices of Windows systems are enumerated, being found in the list of devices of Windows systems needs the current camera device for carrying out picture treatment;Step S2:One or more in brightness, exposure and contrast to current camera output picture properties are adjusted.The invention also discloses a kind of system of camera picture treatment in windows systems.The present invention can optimize regulation to camera output picture.
Description
Technical field
The present invention relates to image processing field, and in particular to a kind of method of camera picture treatment in Windows systems
The system processed with camera picture in a kind of Windows systems.
Background technology
When being taken pictures with mobile phone, it is possible to use the U.S. face that mobile phone camera is carried is set, to shooting the size of photo, gathering
Focal power, exposure, brightness, saturation degree, contrast etc. are adjusted, so as to reach the purpose of optimization photo.
With the rise of live industry, when main broadcaster carries out live, the main broadcaster before computer would generally open camera and see
Crowd carries out interaction, but Windows systems export the regulatory function of picture due to lacking to camera at present, therefore runs on
Live software in Windows systems cannot often be adjusted by exporting picture to camera, reach the live picture of optimization
Purpose.
The content of the invention
For defect present in prior art, it is an object of the invention to provide camera in a kind of Windows systems
The system of camera picture treatment in the method and a kind of Windows systems of picture treatment, can enter to camera output picture
Row optimizing regulation.
To achieve the above objectives, the present invention is adopted the technical scheme that:Including:
Step S1:All camera titles in the list of devices of Windows systems are enumerated, in the equipment of Windows systems
Being found in list needs the current camera device for carrying out picture treatment;
Step S2:Use the one kind or several in the first adjusting method, second adjusting method and the third adjusting method
Plant and current camera picture is processed;Wherein,
The first adjusting method is that the IAMVideoProcAmp interfaces current camera of regulation is defeated in calling Windows systems
The brightness of frame out;
Second adjusting method is that the IAMCameraControl interfaces current camera of regulation is defeated in calling Windows systems
The exposure of frame out;
The third adjusting method is the pixel average according to each pixel of picture, and pixel is divided into white group and black class,
Increase and decrease the contrast of picture by the pixel value for increasing white group pixel or the pixel value for reducing black class pixel.
On the basis of above-mentioned technical proposal, step S1 is specially:
S1.1:Create needs the ICreateDevEnum of the current camera device for carrying out picture treatment to connect for enumerating
Mouthful;
S1.2:According to ICreateDevEnum interfaces, obtain for enumerate Windows systems list of devices in camera
The IEnumMoniker interfaces of title;
S1.3:Being found in the list of devices of Windows systems needs the current camera for carrying out picture treatment;
S1.4:The IMoniker interfaces of current camera are obtained, the IMoniker interfaces are DirectShow kits
In start node.
On the basis of above-mentioned technical proposal, the brightness regulation step of current camera output picture is:
S2.1.1:According to IMoniker interfaces, obtain for adjusting camera output picture brightness
IAmVideoProcAmp interfaces;
S2.1.2:The Set methods in IAmVideoProcAmp interfaces are called, using the enumerated value of camera brightness as ginseng
In the incoming Set methods of number, complete to export current camera the regulation of picture brightness.
On the basis of above-mentioned technical proposal, the exposure regulating step of current camera output picture is:
S2.2.1:According to IMoniker interfaces, obtain for adjusting camera output picture exposure
IAmCameraControl interfaces;
S2.2.2:Call the Set methods in IAmCameraControl interfaces, using the enumerated value of camera exposure as
In the incoming Set methods of parameter, complete to export current camera the regulation of picture exposure.
On the basis of above-mentioned technical proposal, the pixel mean value computation formula of each pixel is:
Avreage (rgb)=(r+g+b)/3
Wherein, avreage (rgb) represents pixel average, and r is the RED sector of pixel, and g is the green portion of pixel, and b is
The blue portion of pixel.
On the basis of above-mentioned technical proposal, the sorting technique of pixel is:
It is 128 to set classification threshold values, and as avreage (rgb) >=128, pixel is white group, as avreage (rgb) <
When 128, pixel is black class.
The system that the present invention also provides camera picture treatment in a kind of Windows systems, including:
Acquisition module, its camera title for being used for all cameras in the list of devices for enumerate Windows systems, and
Being found in the list of devices of Windows systems needs the current camera for carrying out picture treatment;
Adjustment module, it is used in the current camera output brightness of picture properties, exposure and contrast
Or multiple is adjusted;
Output module, it is used to export the camera picture after regulation.
On the basis of above-mentioned technical proposal, call in Windows systems IAMVideoProcAmp interfaces and
IAMCameraControl interfaces adjust the brightness attribute and exposure attribute that current camera exports picture respectively.
On the basis of above-mentioned technical proposal, the adjusting method of the contrast properties of current camera output picture is:
According to the pixel average of each pixel of picture, pixel is divided into white group and black class, by increasing white group picture
The pixel value of element or the pixel value of reduction black class pixel increase and decrease the contrast of picture.
On the basis of above-mentioned technical proposal, the output module is used to export the camera picture after regulation to live
Software.
Compared with prior art, the advantage of the method for camera picture treatment is in a kind of Windows systems of the invention:
By calling the camera connected in Windows systems, the direct picture to camera output carries out excellent in Windows systems
Change regulation, it is efficiently and convenient.
The advantage of the system of camera picture treatment is in a kind of Windows systems of the present invention:When main broadcaster is before computer
When unlatching camera and spectators carry out living broadcast interactive, the picture directly to camera output in Windows systems is optimized
Regulation.
Brief description of the drawings
Fig. 1 is the flow chart of the method for camera picture treatment in a kind of Windows systems of the invention.
Specific embodiment
The present invention is described in further detail below in conjunction with accompanying drawing.
It is shown in Figure 1, the method that the present invention provides camera picture treatment in a kind of Windows systems, by the party
Method, the picture of camera output that can be to being connected in Windows systems is optimized, and the method is based in Windows systems
DirectShow kits, DirectShow be Microsoft release Streaming Media treatment kit, in DirectShow,
The processing procedure of whole data flow is managed using a kind of model for being called Filter Graph.The method includes:
Step S1:All camera titles in the list of devices of Windows systems are enumerated, in the equipment of Windows systems
Being found in list needs the current camera for carrying out picture treatment.May be connected with because operation has on the computer of Windows systems
Multiple cameras, are specific to the defeated of which camera in Windows systems in order to determine as needed by this step
Frame out is adjusted, and it is right that the camera title in current camera and the Windows list of devices of regulation will be needed to carry out
Should, specifically include:
S1.1:CoCreateInstance functions are called, to be created and need the current shooting for carrying out picture treatment for enumerating
The ICreateDevEnum interfaces of head apparatus.CoCreateInstance functions belong to the API in Windows systems
(Application Programming Interface, application programming interface), for being created using the class indications specified
Build the object of a no initializtion.ICreateDevEnum interfaces are usually used in obtaining the video installed in current Windows systems and set
It is standby.
S1.2:According to ICreateDevEnum interfaces, in then calling ICreateDevEnum interfaces
QueryInterface methods, obtain for enumerate Windows systems list of devices in camera title
IEnumMoniker interfaces.IEnumMoniker interfaces function as an enumerator, using this interface, can obtain and take the photograph
As the title of head.
S1.3:Being found in the list of devices of Windows systems needs the current camera for carrying out picture treatment, by
The shooting first place consistent with the title of current camera device is found in the list of devices of Windows systems in camera title
Claim, you being found in the list of devices of Windows systems needs the current camera for carrying out picture treatment.For current shooting
The title of head apparatus, the method for acquisition is:The Next methods in IEnumMoniker interfaces are called, IMoniker interfaces are obtained,
Then the BindToStorage methods in IMoniker interfaces are called, IPropertyBag interfaces are obtained, is then called
Read methods in IPropertyBag interfaces, obtain the title of current camera device.IIPropertyBag interfaces are storage
The interface of attribute.
S1.4:The IMoniker interfaces of current camera are obtained, for the use of subsequent step.IMoniker interfaces are
Start node in DirectShow kits.
Step S2:The property control regulation interface of current camera is obtained, the first adjusting method, second regulation is used
One or more in method and the third adjusting method are processed camera picture.The first adjusting method is to call
IAMVideoProcAmp interfaces adjust the brightness that current camera exports picture in Windows systems;Second adjusting method be
IAMCameraControl interfaces adjust the exposure that current camera exports picture in calling Windows systems;The third is adjusted
Section method is the pixel average according to each pixel of picture, pixel is divided into white group and black class, by increasing white group picture
The pixel value of element or the pixel value of reduction black class pixel increase and decrease the contrast of picture.
It is to the brightness regulation step that current camera exports picture:
S2.1.1:According to IMoniker interfaces, obtain for adjusting camera output picture brightness
IAmVideoProcAmp interfaces.IAmVideoProcAmp interfaces are used for the related category for controlling to adjusting camera output picture
Property, such as brightness, saturation degree, contrast.
S2.1.2:The Set methods in IAmVideoProcAmp interfaces are called, by IAmVideoProcAmp interfaces
Set methods, can set the value of certain attribute of camera output picture.The enumerated value of camera brightness is incoming as parameter
In Set methods, complete to export current camera the regulation of picture brightness, the enumerated value of camera brightness can be moved as needed
State is set.
It is to the exposure regulating step that current camera exports picture:
S2.2.1:According to IMoniker interfaces, obtain for adjusting camera output picture exposure
IAmCameraControl interfaces.IAmCameraControl interfaces are used to control and adjust the association attributes of camera control,
Such as association attributes such as exposure, scaling, focusing, inclination.
S2.2.2:The Set methods in IAmCameraControl interfaces are called, by IAmCameraControl interfaces
Set methods, the value of camera output picture certain attribute can be set.Passed the enumerated value of camera exposure as parameter
Enter in Set methods, complete to export current camera the regulation of picture exposure.
It is to the contrast adjustment step that current camera exports picture:
S2.3.1:Calculate the pixel average of each pixel of current camera output picture.The pixel average meter of each pixel
Calculating formula is:
Avreage (rgb)=(r+g+b)/3
Wherein, avreage (rgb) represents pixel average, and r is the RED sector of pixel, and g is the green portion of pixel, and b is
The blue portion of pixel.
S2.3.2:Pixel is divided into by white group and black class according to pixel average.The sorting technique of pixel is:
It is 128 to set classification threshold values, and as avreage (rgb) >=128, pixel is white group, as avreage (rgb) <
When 128, pixel is black class.
S2.3.3:Increase the pixel value of white group pixel, reduce the pixel value of black class pixel, complete to current camera
Export the regulation of picture exposure.Regulated quantity for white group pixel and the pixel value of black class pixel can be moved as needed
State sets.The formula of the pixel value for increasing white group pixel is new (white)=cat (white)+deltal, wherein,
New (white) is the pixel value of the white group pixel after regulation, and cat (white) is the pixel of the white group pixel before regulation
Value, deltal is the regulated quantity of pixel value.The formula of the pixel value for increasing black class pixel is new (black)=cat
(black)-delta, wherein, the pixel value of the black class pixel after new (black) regulations, cat (black) is before adjusting
The pixel value of black class pixel, deltal is the regulated quantity of pixel value.
Using above method, when main broadcaster is when camera is opened and spectators carry out living broadcast interactive before computer, in Windows systems
Picture on system directly to camera output optimizes regulation.
The invention also discloses camera picture in a kind of Windows systems using above-mentioned camera picture processing method
The system for the treatment of, including acquisition module, adjustment module and output module.
Acquisition module is used to enumerate the camera title of all cameras in the list of devices of Windows systems, and
Being found in the list of devices of Windows systems needs the current camera for carrying out picture treatment;Adjustment module is used for when proactive
One or more in brightness, exposure and contrast as head output picture properties are adjusted;Output module is used to export
Camera picture after regulation, particularly output module the camera picture after regulation is exported to operating on Windows
Live software, live software by picture transmission to server, user access server be may be viewed by it is live.Adjustment module can be with
According to the parameter value being manually set, the every attribute to camera output picture is adjusted.
Adjustment module calls IAMVideoProcAmp interfaces and IAMCameraControl interface point in Windows systems
Brightness attribute and exposure attribute that current camera exports picture are not adjusted.Current camera exports the contrast properties of picture
Adjusting method be:According to the pixel average of each pixel of picture, pixel is divided into white group and black class, by increasing white
The pixel value of class pixel or the pixel value of reduction black class pixel increase and decrease the contrast of picture.
The present invention is not limited to the above-described embodiments, for those skilled in the art, is not departing from
On the premise of the principle of the invention, some improvements and modifications can also be made, these improvements and modifications are also considered as protection of the invention
Within the scope of.The content not being described in detail in this specification belongs to prior art known to professional and technical personnel in the field.
Claims (10)
1. a kind of method that camera picture is processed in Windows systems, it is characterised in that the method is opened based on DirectShow
Give out a contract for a project, including:
Step S1:All camera titles in the list of devices of Windows systems are enumerated, in the list of devices of Windows systems
In find and need the current camera device for carrying out picture treatment;
Step S2:It is right using one or more in the first adjusting method, second adjusting method and the third adjusting method
Current camera picture is processed;Wherein,
The first adjusting method is that IAMVideoProcAmp interfaces adjust current camera output picture in calling Windows systems
The brightness in face;
Second adjusting method is that IAMCameraControl interfaces adjust current camera output picture in calling Windows systems
The exposure in face;
The third adjusting method is the pixel average according to each pixel of picture, and pixel is divided into white group and black class, is passed through
The pixel value for increasing white group pixel or the pixel value for reducing black class pixel increase and decrease the contrast of picture.
2. the method that camera picture is processed in a kind of windows systems as claimed in claim 1, it is characterised in that step
S1 is specially:
S1.1:Create the ICreateDevEnum interfaces that the current camera device for carrying out picture treatment is needed for enumerating;
S1.2:According to ICreateDevEnum interfaces, obtain for enumerate Windows systems list of devices in camera title
IEnumMoniker interfaces;
S1.3:Being found in the list of devices of Windows systems needs the current camera for carrying out picture treatment;
S1.4:The IMoniker interfaces of current camera are obtained, the IMoniker interfaces are in DirectShow kits
Start node.
3. the method that camera picture is processed in a kind of windows systems as claimed in claim 2, it is characterised in that current
Camera output picture brightness regulation step be:
S2.1.1:According to IMoniker interfaces, obtain and connect for adjusting the IAmVideoProcAmp of camera output picture brightness
Mouthful;
S2.1.2:The Set methods in IAmVideoProcAmp interfaces are called, is passed the enumerated value of camera brightness as parameter
Enter in Set methods, complete to export current camera the regulation of picture brightness.
4. the method that camera picture is processed in a kind of windows systems as claimed in claim 2, it is characterised in that current
Camera output picture exposure regulating step be:
S2.2.1:According to IMoniker interfaces, obtain for adjusting camera output picture exposure
IAmCameraControl interfaces;
S2.2.2:The Set methods in IAmCameraControl interfaces are called, using the enumerated value of camera exposure as parameter
In incoming Set methods, complete to export current camera the regulation of picture exposure.
5. the method that camera picture is processed in a kind of windows systems as claimed in claim 1, it is characterised in that each
The pixel mean value computation formula of pixel is:
Avreage (rgb)=(r+g+b)/3
Wherein, avreage (rgb) represents pixel average, and r is the RED sector of pixel, and g is the green portion of pixel, and b is pixel
Blue portion.
6. the method that camera picture is processed in a kind of windows systems as claimed in claim 5, it is characterised in that pixel
Sorting technique be:
It is 128 to set classification threshold values, and as avreage (rgb) >=128, pixel is white group, as avreage (rgb) < 128
When, pixel is black class.
7. the system that camera picture is processed in a kind of windows systems, it is characterised in that including:
Acquisition module, its camera title for being used for all cameras in the list of devices for enumerate Windows systems, and
Being found in the list of devices of Windows systems needs the current camera for carrying out picture treatment;
Adjustment module, it is used for or many in the current camera output brightness of picture properties, exposure and contrast
It is individual to be adjusted;
Output module, it is used to export the camera picture after regulation.
8. the system that camera picture is processed in a kind of windows systems as claimed in claim 7, it is characterised in that:Call
IAMVideoProcAmp interfaces and IAMCameraControl interfaces adjust current camera output respectively in Windows systems
The brightness attribute and exposure attribute of picture.
9. the system that camera picture is processed in a kind of windows systems as claimed in claim 7, it is characterised in that current
The adjusting method of contrast properties of camera output picture is:
According to the pixel average of each pixel of picture, pixel is divided into white group and black class, by increasing white group pixel
The pixel value of pixel value or reduction black class pixel increases and decreases the contrast of picture.
10. the system that camera picture is processed in a kind of windows systems as claimed in claim 7, it is characterised in that:It is described
Output module is used to export the camera picture after regulation to live software.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201611125261.1A CN106791384A (en) | 2016-12-08 | 2016-12-08 | The method and system of camera picture treatment in a kind of Windows systems |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201611125261.1A CN106791384A (en) | 2016-12-08 | 2016-12-08 | The method and system of camera picture treatment in a kind of Windows systems |
Publications (1)
Publication Number | Publication Date |
---|---|
CN106791384A true CN106791384A (en) | 2017-05-31 |
Family
ID=58881959
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201611125261.1A Pending CN106791384A (en) | 2016-12-08 | 2016-12-08 | The method and system of camera picture treatment in a kind of Windows systems |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106791384A (en) |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102014279A (en) * | 2010-12-20 | 2011-04-13 | 杭州华三通信技术有限公司 | Method and device for intensifying video image contrast |
CN105631417A (en) * | 2015-12-24 | 2016-06-01 | 武汉鸿瑞达信息技术有限公司 | Video beautification system and method applied to Internet video live broadcast |
-
2016
- 2016-12-08 CN CN201611125261.1A patent/CN106791384A/en active Pending
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102014279A (en) * | 2010-12-20 | 2011-04-13 | 杭州华三通信技术有限公司 | Method and device for intensifying video image contrast |
CN105631417A (en) * | 2015-12-24 | 2016-06-01 | 武汉鸿瑞达信息技术有限公司 | Video beautification system and method applied to Internet video live broadcast |
Non-Patent Citations (3)
Title |
---|
MICROSOFT: "IAMCameraControl Interface", 《MICROSOFT DOCS: HTTPS://MSDN.MICROSOFT.COM/EN-US/LIBRARY/AA929836.ASPX》 * |
MICROSOFT: "IAMVideoProcAmp Interface", 《MICROSOFT DOCS: HTTPS://DOCS.MICROSOFT.COM/EN-US/PREVIOUS-VERSIONS//MS784400(V=VS.85)》 * |
程序园: "利用DirectShow列举系统已安装的摄像头设备", 《HTTP://WWW.VOIDCN.COM/ARTICLE/P-FTTTPKBB-MN.HTML》 * |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9247106B2 (en) | Color correction based on multiple images | |
CN104902250B (en) | Flash synchronization using image sensor interface timing signal | |
CN102547301B (en) | Use the system and method for image-signal processor image data processing | |
US9942481B2 (en) | Systems and methods for iterative adjustment of video-capture settings based on identified persona | |
CN103716547A (en) | Smart mode photographing method | |
CN1953515A (en) | A method to automatically regulate the image brightness and automatic imaging device | |
CN106134189B (en) | Image processing apparatus, photographic device, image processing method and program | |
US20190313071A1 (en) | Dynamic chroma key for video background replacement | |
US20150189171A1 (en) | Method and electronic apparatus for sharing photographing setting values, and sharing system | |
JP7152065B2 (en) | Image processing device | |
JP6162345B2 (en) | Raw scene recognition that allows scene-dependent image modification before image recording or display | |
US9723194B2 (en) | Photographing apparatus providing image transmission based on communication status, method of controlling the same, and non-transitory computer-readable storage medium for executing the method | |
CN107710755A (en) | Dynamic frame for AWB is skipped | |
CN108932696A (en) | The Halation inhibition method and device of signal lamp | |
CN106165409A (en) | Image processing apparatus, camera head, image processing method and program | |
AU2018211310B2 (en) | Local color range selection | |
CN112258380A (en) | Image processing method, device, equipment and storage medium | |
CN110223244A (en) | A kind of method, apparatus of image procossing, electronic equipment and storage medium | |
CN108600675A (en) | Channel way extended method, equipment, Network Personal Video Recorder and storage medium | |
CN107682611A (en) | Method, apparatus, computer-readable recording medium and the electronic equipment of focusing | |
CN103841329B (en) | System for adjusting imaging effect of camera | |
CN113112422A (en) | Image processing method, image processing device, electronic equipment and computer readable medium | |
CN106791384A (en) | The method and system of camera picture treatment in a kind of Windows systems | |
CN111447360A (en) | Application program control method and device, storage medium and electronic equipment | |
CN112488933B (en) | Video detail enhancement method and device, mobile terminal and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20170531 |
|
RJ01 | Rejection of invention patent application after publication |