Color temperature measuring method and color temperature measuring device

文档序号:1241045 发布日期:2020-08-18 浏览:32次 中文

阅读说明:本技术 色温测量方法、色温测量装置 (Color temperature measuring method and color temperature measuring device ) 是由 张春 谢奕 于 2020-04-03 设计创作,主要内容包括:本发明属于摄影技术领域,尤其涉及色温测量方法、色温测量装置。其中,色温测量方法,包括:获取环境图像的图像数据,并根据图像数据生成第一图片;获取第一图片中的各个像素点的三原色的像素值R、G、B以计算第一图片的平均像素值R<Sub>平</Sub>、G<Sub>平</Sub>、B<Sub>平</Sub>;计算得到像素偏移量X;其中像素偏移量X=(R<Sub>平</Sub>-B<Sub>平</Sub>)/(R<Sub>平</Sub>+G<Sub>平</Sub>+B<Sub>平</Sub>);将像素偏移量X代入预设公式y=ax<Sup>4</Sup>+bx<Sup>3</Sup>+cx<Sup>2</Sup>+dx+e计算得到第一图片的色温值Y,其中,a、b、c、d、e均为常数。采用本发明技术方案解决了现有技术中使用传统的光谱仪或者测光表测试色温具有设备体积大、价格昂贵、操作专业度高的问题。(The invention belongs to the technical field of photography, and particularly relates to a color temperature measuring method and a color temperature measuring device. The color temperature measuring method comprises the following steps: acquiring image data of an environment image, and generating a first picture according to the image data; acquiring R, G, B pixel values of three primary colors of each pixel point in the first picture to calculate an average pixel value R of the first picture Flat plate 、G Flat plate 、B Flat plate (ii) a Calculating to obtain a pixel offset X; wherein the pixel offset X ═ (R) Flat plate ‑B Flat plate )/(R Flat plate +G Flat plate +B Flat plate ) (ii) a Substituting the pixel offset X into a preset formula y ═ ax 4 +bx 3 +cx 2 And calculating the color temperature value Y of the first picture by + dx + e, wherein a, b, c, d and e are constants. The technical scheme of the invention solves the problems that the traditional spectrometer or photometer used for testing the color temperature in the prior art has large equipment volume, high price and high operation specialty.)

1. A color temperature measurement method, characterized by comprising:

acquiring image data of an environment image, and generating a first picture according to the image data;

acquiring R, G, B pixel values of three primary colors of each pixel point in the first picture to calculate an average pixel value R of the first pictureFlat plate、GFlat plate、BFlat plate

According to the obtained average pixel value RFlat plate、GFlat plate、BFlat plateCalculating to obtain a pixel offset X; wherein the pixel offset X ═ RFlat plate-BFlat plate)/(RFlat plate+GFlat plate+BFlat plate);

Substituting the pixel offset X into a preset formula y ═ ax4+bx3+cx2And x in the + dx + e is calculated to obtain the color temperature value Y of the first picture, wherein a, b, c, d and e are constants.

2. The color temperature measurement method according to claim 1, wherein the process of acquiring image data of an environmental image includes: and shooting the field environment in real time through the camera equipment to acquire the image data of the environment image in real time.

3. The color temperature measurement method according to claim 2, wherein the photographing of the live environment in real time by the image pickup apparatus to acquire image data of the environment image in real time includes: the camera device is a mobile phone camera, the mobile phone camera is set to be in white balance before shooting is carried out, at least one frame of image data of the environment image is obtained every second in the shot image data, and the first picture is generated based on all the obtained image data.

4. The color temperature measurement method according to claim 1, wherein the process of acquiring image data of an environmental image includes: and reading the image data of the environment image from a local memory or a remote server.

5. The color temperature measurement method according to claim 2 or 4, wherein the image pickup apparatus has a display screen for displaying the first picture, the color temperature measurement method further comprising: and after the color temperature value Y of the first picture is obtained through calculation, displaying the color temperature value Y of the first picture on the first picture in the display screen.

6. The color temperature measuring method according to claim 5, characterized in that the color temperature measuring method further comprises: and after the color temperature value Y of the first picture is obtained through calculation, sequentially obtaining image data of the environment images of a plurality of different scenes, generating corresponding pictures according to the corresponding image data, then calculating the color temperature value Y of the corresponding pictures, and storing all the color temperature values Y one by one.

7. The color temperature measurement method according to claim 1, wherein obtaining the preset formula comprises: in a predetermined ambient color temperature interval [ Y1,Y2]In each interval by a predetermined difference Y3Taking a primary color temperature value YsWherein s is an integer and s > 1, according to the colour temperature value YsSetting the scene, shooting the scene based on an image pickup device to generate image data of an environment image, calculating pixel offset X of the scene based on the image data, performing polynomial fitting on all the pixel offset X through software based on multiple groups of the pixel offset X, and approximating a function to obtain a preset formula y-ax4+bx3+cx2+dx+e。

8. Color temperature measuring method according to claim 7, characterized in that the predetermined difference Y3Is in the range of [10K, 90K ]]The predetermined ambient color temperature interval is [2800K, 10000K ]]。

9. A color temperature measuring apparatus, characterized by comprising:

an image pickup apparatus; the camera shooting equipment is used for shooting a field environment in real time to acquire image data of an environment image;

the image analysis module is connected with the image pickup equipment, and is used for receiving the image data transmitted by the image pickup equipment in real time, analyzing the image data to generate a picture, and acquiring R, G, B pixel values of three primary colors of each pixel point in the picture;

and the calculation module is connected with the image analysis module, and calculates the color temperature value Y of the first picture according to the pixel value R, G, B of the three primary colors of each pixel point in the picture.

10. The color temperature measuring device of claim 9, further comprising a reading module, a communication module and a local memory, wherein the communication module is used for data transmission, and the local memory is divided into a first storage space and a second storage space;

wherein:

the reading module is connected with the communication module to read the image data of the environment image from the remote server;

the reading module is connected with the local storage, the first storage space is used for storing image data of an environment image shot in advance, and the reading module reads and stores the image data in the first storage space;

the reading module is connected with the image analysis module;

the local memory is connected with the calculation module, and the second storage space is used for storing the calculated color temperature value Y.

Technical Field

The invention belongs to the technical field of photography, and particularly relates to a color temperature measuring method and a color temperature measuring device.

Background

The color temperature measurement can provide useful and operable information for the control of scene division, and plays a very important role in the film and television shooting technology. Color temperature measurement works very well when dealing with mixed light sources, many of which have different color temperatures and cannot be determined whether to work well in the final picture. And the color temperature test by using the traditional spectrometer or photometer has the defects of large equipment volume, high price and high operation specialty.

Disclosure of Invention

The invention aims to provide a color temperature measuring method and a color temperature measuring device, and aims to solve the problems that the color temperature is measured by using a traditional spectrometer or a photometer in the prior art, the equipment is large in size, high in price and high in operation specialty.

In order to achieve the purpose, the invention adopts the technical scheme that: a color temperature measurement method, comprising:

acquiring image data of an environment image, and generating a first picture according to the image data;

acquiring R, G, B pixel values of three primary colors of each pixel point in the first picture to calculate an average pixel value R of the first pictureFlat plate、GFlat plate、BFlat plate

Calculating to obtain a pixel offset X according to the obtained average pixel values R flat, G flat and B flat; wherein the pixel offset X ═ (R)Flat plate-BFlat plate)/(RFlat plate+GFlat plate+BFlat plate);

Substituting the pixel offset X into a preset formula y ═ ax4+bx3+cx2And x in the + dx + e is calculated to obtain the color temperature value Y of the first picture, wherein a, b, c, d and e are constants.

Further, the process of acquiring image data of an environmental image includes: the scene environment is shot in real time through the camera shooting device so as to acquire image data of the environment image in real time.

Further, the photographing of the live environment in real time by the photographing apparatus to acquire image data of the environment image in real time includes: the camera equipment is a mobile phone camera, before shooting, the mobile phone camera is set to be in white balance, image data of at least one frame of environment image is obtained every second in the shot image data, and a first picture is generated based on all the obtained image data.

Further, the process of acquiring image data of an environmental image includes: and reading the image data of the environment image from a local memory or a remote server.

Further, the image pickup apparatus has a display screen for displaying the first picture, and the color temperature measurement method further includes: and after the color temperature value Y of the first picture is obtained through calculation, displaying the color temperature value Y of the first picture on the first picture in the display screen.

Further, the color temperature measurement method further includes: after the color temperature value Y of the first picture is obtained through calculation, image data of environment images of a plurality of different scenes are sequentially obtained, corresponding pictures are generated according to the corresponding image data, then the color temperature value Y of the corresponding pictures is obtained through calculation, and all the color temperature values Y are stored one by one.

Further, obtaining the preset formula includes: in a predetermined ambient color temperature interval [ Y1,Y2]In each interval by a predetermined difference Y3Taking a primary color temperature value YsWherein s is an integer and s > 1, according to the colour temperature value YsSetting a scene, shooting the scene based on an image pickup device to generate image data of an environment image, calculating pixel offset X of the scene based on the image data, performing polynomial fitting on all the pixel offset X through software based on multiple groups of obtained pixel offset X, and approximating a function to obtain a preset formula y-ax4+bx3+cx2+dx+e。

Further, the value range of the predetermined difference value Y3 is [10K, 90K ], and the predetermined ambient color temperature interval is [2800K, 10000K ].

According to another aspect of the present invention, a color temperature measuring apparatus is provided. Specifically, the color temperature measuring apparatus includes: an image pickup apparatus; the camera shooting equipment is used for shooting a field environment in real time to acquire image data of an environment image; the image analysis module is connected with the camera equipment, is used for receiving image data transmitted by the camera equipment in real time, analyzes the image data to generate a picture, and acquires R, G, B pixel values of three primary colors of each pixel point in the picture; and the calculation module is connected with the image analysis module, and calculates the color temperature value Y of the first picture according to the pixel value R, G, B of the three primary colors of each pixel point in the picture.

Furthermore, the color temperature measuring device also comprises a reading module, a communication module and a local memory, wherein the communication module is used for realizing data transmission, and the local memory is divided into a first storage space and a second storage space; wherein: the reading module is connected with the communication module to read the image data of the environment image from the remote server; the reading module is connected with the local memory, the first storage space is used for storing image data of an environment image shot in advance, and the reading module reads and stores the image data in the first storage space; the reading module is connected with the image analysis module; the local memory is connected with the calculation module, and the second storage space is used for storing the calculated color temperature value Y.

The invention has at least the following beneficial effects:

the color temperature measuring method provided by the invention is applied to measure the color temperatures of different scenes, the image data of the environment image of the scene is obtained, the picture is generated based on the obtained image data, and then the average pixel value R of the picture is obtained by calculating the pixel value R, G, B of the three primary colors of each pixel point on the picture aiming at the generated pictureFlat plate、GFlat plate、BFlat plateAnd then based on the average pixel value RFlat plate、GFlat plate、BFlat plateCalculating a pixel offset X with respect to the picture, and substituting the pixel offset X into a preset formula y ═ ax4+bx3+cx2The + dx + e can be calculated to obtain the color temperature value Y of the picture. By applying the color temperature measuring method, the corresponding running part structure can be designed in a targeted manner, so that a brand-new color temperature measuring device is designed, the idea that the traditional spectrometer or a light meter and other large-scale measuring equipment are used in the prior art is avoided by the new color temperature measuring device, the measuring cost is low, the color temperature measuring result can meet the measuring requirement in the professional photography light and shadow effect application field, and the requirement in the daily common application field can also be met.

Drawings

In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the embodiments or the prior art descriptions will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without inventive exercise.

FIG. 1 is a block diagram illustrating steps of a color temperature measuring method according to an embodiment of the present invention;

FIG. 2 is a block diagram of a working flow of a color temperature measuring method according to an embodiment of the present invention;

FIG. 3 is an interface diagram showing a picture and a color temperature value Y during the process of measuring color temperature according to the embodiment of the present invention;

FIG. 4 is an interface diagram of storing a color temperature value Y after the color temperature of a target scene is measured according to an embodiment of the present invention;

FIG. 5 is a graph showing experimental data obtained by polynomial fitting using software and function approximation;

FIG. 6 is a color line comparison of FIG. 3;

FIG. 7 is a schematic configuration diagram of a first embodiment of a color temperature measuring apparatus of the present invention;

fig. 8 is a schematic configuration diagram of a color temperature measuring apparatus according to a second embodiment of the present invention.

The reference numerals denote:

101. an image pickup apparatus; 102. an image analysis module; 103. a calculation module; 104. a reading module; 105. a communication module; 106. a local memory; 1061. a first storage space; 1062. a second storage space.

Detailed Description

Reference will now be made in detail to embodiments of the present invention, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to the same or similar elements or elements having the same or similar function throughout. The embodiments described below with reference to the drawings are illustrative and intended to be illustrative of the invention and are not to be construed as limiting the invention.

In the description of the present invention, it is to be understood that the terms "length", "width", "upper", "lower", "front", "rear", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer", and the like, indicate orientations or positional relationships based on the orientations or positional relationships illustrated in the drawings, and are used merely for convenience in describing the present invention and for simplicity in description, and do not indicate or imply that the devices or elements referred to must have a particular orientation, be constructed in a particular orientation, and be operated, and thus, are not to be construed as limiting the present invention.

Furthermore, the terms "first", "second", etc. are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first," "second," etc. may explicitly or implicitly include one or more of that feature. In the description of the present invention, "a plurality" means two or more unless specifically defined otherwise.

In the present invention, unless otherwise expressly stated or limited, the terms "mounted," "connected," "secured," and the like are to be construed broadly and can, for example, be fixedly connected, detachably connected, or integrally formed; can be mechanically or electrically connected; either directly or indirectly through intervening media, either internally or in any other relationship. The specific meanings of the above terms in the present invention can be understood by those skilled in the art according to specific situations.

As shown in fig. 1-2, the present invention provides a color temperature measuring method, in which for a selected target scene (the target scene may be a field scene or a mode scene in which image data is stored after being shot in advance), the target scene may be a pure color temperature environment, for example, only one color temperature exists for one bulb; for example, if there is an environment in which two or more bulbs project lights to each other, the color temperature at this time may be formed by mixing two or more simple color temperatures.

As shown in fig. 1, the color temperature measuring method includes the following:

first, S10 is executed, image data of an environment image (the image data includes light intensity data, color data, and the like) is acquired, and a first picture is generated from the image data. No matter the target scene is the scene or the mode scene, the image data can be obtained only through the shooting process, in the shooting process, each frame of image obtained through shooting is an environment image, and the image data contained in the environment images of different frames are different. During shooting, a first picture can be generated according to the image data of one frame of environment image; the image data of a plurality of frames of the taken environment images can also be acquired, and then the image data are compounded to generate the first picture, that is, the first picture is obtained after the plurality of frames of environment images are compounded.

Then, S20 is executed, and on the basis of the obtained first picture, pixel values R, G, B of three primary colors of each pixel point in the first picture are obtained, so as to calculate an average pixel value R of the first pictureFlat plate、GFlat plate、BFlat plate. Specifically, R is a pixel value of red, G is a pixel value of green, B is a pixel value of blue, RFlat plateIs the average pixel value of red, GFlat plateIs the average pixel value of green, BFlat plateIs the average pixel value for blue.

Calculation of RFlat plate、GFlat plate、BFlat plateThe calculation formula of (2) is as follows:

Rflat plate=(R1+R2+R3+···+Rn-1+Rn)/n;

GFlat plate=(G1+G2+G3+···+Gn-1+Gn)/n;

BFlat plate=(B1+B2+B3+···+Bn-1+Bn)/n;

Wherein R is1、R2、R3、···、Rn-1、RnThe red pixel value of each pixel point in the first picture is obtained; g1、G2、G3、···、Gn-1、GnThe pixel value of the green of each pixel point in the first picture is obtained; b is1、B2、B3、···、Bn-1、BnThe pixel value of blue of each pixel point in the first picture is obtained; and n is the total number of pixel points in the first picture.

Then, step S30 is executed to calculate the average pixel value R of the first pictureFlat plate、GFlat plate、BFlat plateAfter, the edge is based on RFlat plate、GFlat plate、BFlat plateCalculating the pixel offset X of the first picture, wherein the specific calculation formula is as follows:

X=(Rflat plate-BFlat plate)/(RFlat plate+GFlat plate+BFlat plate)。

Finally, S40 is executed to substitute the calculated pixel shift amount X into the preset formula y ═ ax4+bx3+cx2X in + dx + e is the calculated color temperature value Y of the first picture, that is, the calculated color temperature value Y of the target scene represented by the first picture. In the formula y ═ ax4+bx3+cx2In x in + dx + e, a, b, c, d, e are all constants.

The color temperature measuring method provided by the invention is applied to measure the color temperatures of different scenes, the image data of the environment image of the scene is obtained, the picture is generated based on the obtained image data, and then the average pixel value R of the picture is obtained by calculating the pixel value R, G, B of the three primary colors of each pixel point on the picture aiming at the generated pictureFlat plate、GFlat plate、BFlat plateAnd then based on the average pixel value RFlat plate、GFlat plate、BFlat plateCalculating a pixel offset X with respect to the picture, and substituting the pixel offset X into a preset formula y ═ ax4+bx3+cx2The + dx + e can be calculated to obtain the color temperature value Y of the picture. By applying the color temperature measuring method, the corresponding running part structure can be designed in a targeted manner, so that a brand-new color temperature measuring device is designed, the idea that the prior art uses large-scale measuring equipment such as a traditional spectrometer or a light meter is avoided by the novel color temperature measuring device, the measuring cost is low, and in addition, the measuring cost is lowThe color temperature measurement result can meet the measurement requirements in the application field of professional photographic light and shadow effects and also can meet the requirements in the daily common application field.

In the course of studying the method for measuring the color temperature according to the invention, the difficulty lies in determining the predetermined formula y ═ ax4+bx3+cx2+ dx + e, which is required to be tested through extensive data and then summarized. Specifically, in a predetermined ambient color temperature interval [ Y1,Y2]In each interval by a predetermined difference Y3Taking a primary color temperature value YsWherein s is an integer and s > 1, according to the colour temperature value YsSetting a field scene, shooting the field scene by using a camera device to obtain image data, generating a first picture according to the image data, calculating and obtaining a pixel offset X of the first picture representing the field scene based on the first picture, performing polynomial fitting on all the pixel offsets X through corresponding software (the software which can be adopted comprises software tools with corresponding mathematical fitting functions such as MATLAB, Excel and the like) based on a plurality of groups of pixel offsets X obtained by experimental calculation, and approximating functions to obtain a preset formula: y is ax4+bx3+cx2+ dx + e, where a, b, c, d, e are all constants.

Thus, after the pixel offset amount X of the first picture representing a certain live scene is determined accordingly, then by substituting the pixel offset amount X into the preset formula y ═ ax4+bx3+cx2And calculating the + dx + e to obtain the corresponding color temperature value Y.

In order to be more suitable for real environment and thus for live scene in life, the predetermined environmental color temperature interval is [2800K, 10000K ] during the experiment process]And a predetermined difference Y3Is in the range of [10K, 90K ]](As can be appreciated, the predetermined difference Y3The smaller the value of (a), the more enriched the experimental data, the more accurate the experimental result obtained, i.e. the closer the polynomial of the calculation method for finally obtaining the predetermined color temperature is to the reality, the smaller the error), preferably, in the experimental process of the present invention, the predetermined difference Y is350K. Aiming at the environmental color temperature interval [2800K, 10000K]A predetermined difference Y3The experimental data for 50K are detailed in table one.

Watch 1

According to the experimental data obtained in the first table, the invention preferably adopts MATLAB to perform polynomial fitting of 4 th degree, and the function is approximated to obtain the polynomial y of 4 th degree as ax4+bx3+cx2And + dx + e is a preset formula. As shown in fig. 5 and 6, is a curve representation resulting from a 4 th order polynomial fit and function approximation. By collecting a plurality of experimental data, the determination values of the corresponding constants a, b, c, d and e in the preset formula adopted in the experiment can be determined.

When measuring the color temperature for the scene, the scene environment needs to be shot in real time by the camera equipment, which can be a mobile phone camera, a camera or a video camera. And then acquiring the image data of the corresponding environment image in the shooting process in real time. Before real-time shooting is carried out by using a mobile phone camera, relevant parameters of the mobile phone camera need to be set, wherein white balance setting must be carried out on the mobile phone camera. And, in the image data obtained by shooting, image data of at least one frame of environment image is acquired every second, and a first picture is generated based on all the acquired image data, so that when the color temperature of different scenes is measured continuously, the continuity of the image data of the environment image corresponding to the different scenes can be ensured.

When the color temperature is measured for the mode scene, the image data of the environment image is read from the local storage or the remote server at this time, thereby generating the first picture, i.e., S10 is performed, and then the color temperature value Y is calculated by sequentially performing S20, S30, and S40. It can be understood that the color temperature calculation does not involve conversion between pixels and polar coordinates, and does not use a correlation matrix conversion mode, but directly performs correlation calculation through the pixel value R, G, B of the picture to obtain a color temperature value, thereby effectively reducing the complexity of data processing and further effectively improving the calculation speed of measuring the color temperature.

After the color temperature value Y of a target scene is measured, the color temperature value Y can be stored, so that the color temperature value Y can be directly found and read in the stored data when the ambient color temperature of the scene needs to be known for the same scene in the future, as shown in fig. 4. Meanwhile, after the color temperature value Y of one target scene is measured and stored (the stored file is opened and displayed as an interface shown in FIG. 3, and the files are automatically named during storage, such as scenes 1-3180K, scenes 2-5000K, scenes 3-5490K, etc.), the color temperature of the next target scene can be measured immediately, that is, after the color temperature value Y of the first picture is calculated, for example, two remaining target scenes wait to measure the color temperature, for the next target scene, S10 can be re-executed to obtain the second picture, then S20, S30 and S40 are sequentially executed, the color temperature value Y of the second target scene can be calculated, the color temperature value Y is stored, then the color temperature measurement is performed for the third target scene, then S10 is re-executed to obtain the third picture, then S20, and S5490 are sequentially executed, S30 and S40, the color temperature value Y of the third target scene can be calculated and stored, and so on, so that the color temperature values of a plurality of target scenes can be continuously measured. Certainly, in the later process, the color temperature values Y corresponding to the pre-stored multiple target scenes may also be called out, for example, when facing the same scene, the corresponding color temperature values Y that have been measured and stored before are directly called without measuring again, and in other embodiments, the color temperature values Y corresponding to the stored multiple target scenes may also be sent to other devices (for example, a mobile phone, a computer, a server, and the like) to be shared.

Preferably, the image capturing apparatus adopted by the present invention has a display screen, and in the process of capturing images of different target scenes each time, after a corresponding picture is generated, the corresponding picture is displayed on the display screen, as shown in fig. 3. For example, when three target scenes are measured continuously, after a first picture is generated by shooting the first target scene, the display screen displays the first picture in real time, and after the color temperature value Y corresponding to the first picture is obtained through calculation, the display screen displays the color temperature value Y corresponding to the first picture obtained through calculation on the first picture in the display screen in real time, as shown in fig. 3; when a second picture is generated by shooting a second target scene, the display screen displays the second picture in real time, and after the color temperature value Y corresponding to the second picture is obtained through calculation, the display screen displays the color temperature value Y corresponding to the second picture obtained through calculation on the second picture in the display screen in real time; when a third picture is generated by shooting a third target scene, the third picture is displayed in real time by the display screen, and after the color temperature value Y corresponding to the third picture is obtained through calculation, the color temperature value Y corresponding to the third picture obtained through calculation is displayed on the third picture in real time by the display screen; and so on.

According to another aspect of the present invention, there is provided a color temperature measuring apparatus for measuring a color temperature of a target scene according to the foregoing color temperature measuring method.

As shown in fig. 7, the color temperature measuring apparatus provided by the first embodiment of the present invention includes an image pickup device 101, an image analysis module 102, and a calculation module 103. Specifically, the image capturing device 101 is configured to capture a live environment in real time to obtain image data of an environment image, the image analysis module 102 is connected to the image capturing device 101, when the image capturing device 101 captures and converts the live environment to obtain the image data, the image capturing device 101 transmits the image data to the image analysis module 102, when the image analysis module 102 receives the image data, the image data is analyzed to generate a picture corresponding to the live environment, then, the image analysis module 102 obtains pixel values R, G, B of three primary colors of each pixel point in the picture, the calculation module 103 is connected to the image analysis module 102, and when the image analysis module receives the image data, the image analysis module 102 obtains pixel values R, G, B of three primary colors of each pixel point in the pictureAfter the analyzing module 102 analyzes and obtains the pixel value R, G, B of the three primary colors of each pixel point of the picture, the calculating module 103 first calculates to obtain the average pixel value R of the pictureFlat plate、GFlat plate、BFlat plateThen using the average pixel value RFlat plate、GFlat plate、BFlat plateAnd calculating the formula X ═ (R)Flat plate-BFlat plate)/(RFlat plate+GFlat plate+BFlat plate) Calculating to obtain a pixel offset X, and finally substituting the pixel offset X into a preset formula y ═ ax4+bx3+cx2And x in the + dx + e is calculated to obtain the color temperature value Y of the field environment corresponding to the picture.

As shown in fig. 8, the color temperature measuring apparatus according to the second embodiment of the present invention has the following differences compared to the color temperature measuring apparatus according to the first embodiment. In the second embodiment, the color temperature measuring apparatus further includes a reading module 104, a communication module 105, and a local storage 106, wherein the communication module 104 is used for implementing data transmission, and the local storage 106 divides a first storage space 1061 and a second storage space 1062. When the image analysis module 102 is connected and assembled, the reading module 104 is connected with the communication module 105, the reading module 104 is connected with the first storage space 1061 of the local memory 106, the reading module 104 is connected with the image analysis module 102, and the second storage space 1062 of the local memory 106 is connected with the calculation module 103. Thus, in the color temperature measuring apparatus provided in the second embodiment, three working paths are formed, that is, the working paths shown in fig. 8 that are connected correspondingly are (i), (ii), and (iii). The color temperature measuring device of the first embodiment implements the working path (r), which is the same as the working path (r) implemented by the color temperature measuring device of the second embodiment.

When the color temperature measuring apparatus of the second embodiment operates on the operation path ②, the communication module 105 communicates with the remote server to transmit data, the reading module 104 can read the image data of the desired environment image (the target scene is the mode scene) from the remote server, the reading module 104 transmits the image data to the image analysis module 102, and the image analysis module 102 analyzes the image data to generate the image data corresponding to the desired environment imageNext, in the picture of the field environment, the image analysis module 102 obtains the pixel values R, G, B of the three primary colors of each pixel point in the picture, the calculation module 103 is connected to the image analysis module 102, and after the image analysis module 102 analyzes and obtains the pixel values R, G, B of the three primary colors of each pixel point in the picture, the calculation module 103 first calculates the average pixel value R of the pictureFlat plate、GFlat plate、BFlat plateThen using the average pixel value RFlat plate、GFlat plate、BFlat plateAnd calculating the formula X ═ (R)Flat plate-BFlat plate)/(RFlat plate+GFlat plate+BFlat plate) Calculating to obtain a pixel offset X, and finally substituting the pixel offset X into a preset formula y ═ ax4+bx3+cx2And x in the + dx + e is calculated to obtain the color temperature value Y of the field environment corresponding to the picture.

When the color temperature measuring device of the second embodiment operates in the operating channel ③, at this time, the reading module 104 reads image data (at this time, the target scene is a mode scene) from the first storage space 1061 of the local memory 106, the image data is captured in advance and stored in the first storage space 1061 in advance, the reading module 104 transmits the image data to the image analysis module 102, the image analysis module 102 receives the image data and analyzes the image data to generate a picture corresponding to the field environment, next, the image analysis module 102 obtains pixel values R, G, B of three primary colors of each pixel point in the picture, the calculating module 103 is connected to the image analysis module 102, and after the image analysis module 102 analyzes and obtains the pixel values R, G, B of the three primary colors of each pixel point in the picture, the calculating module 103 first calculates the average pixel value R of the pictureFlat plate、GFlat plate、BFlat plateThen using the average pixel value RFlat plate、GFlat plate、BFlat plateAnd calculating the formula X ═ (R)Flat plate-BFlat plate)/(RFlat plate+GFlat plate+BFlat plate) Calculating to obtain a pixel offset X, and finally substituting the pixel offset X into a preset formula y ═ ax4+bx3+cx2And x in the + dx + e is calculated to obtain the color temperature value Y of the field environment corresponding to the picture.

Compared with the color temperature measuring device of the first embodiment, the color temperature measuring device of the second embodiment is the same except for the above differences, and is not repeated herein.

In addition, in another possible embodiment, in order to reduce the size of the color temperature measuring device and to implement the color temperature detecting device by using the components that can achieve the same function in the prior art as much as possible, the image analysis module 102, the calculation module 103, the reading module 104, the communication module 105 (the communication module 104 can also directly use the mobile phone communication module) and the local storage 106 (the local storage 106 can also directly use the mobile phone memory) are directly integrated on the mobile phone circuit board, and the camera device 101 directly uses the mobile phone camera.

In particular, the image analysis module 102, the calculation module 103 and the reading module 104 are integrated in a mobile phone processor chip to form a corresponding micro-processing circuit; or, the functions corresponding to the image analysis module 102, the calculation module 103 and the reading module 104 are directly realized through the existing protocol architecture of the mobile phone processing chip by adopting an algorithm programming mode, and at this time, an App for generating the smart phone application is constructed.

The method comprises the steps that an App is installed in the smart phone and opened to operate, and after the App operates, the App calls a camera of the smart phone, so that a shooting and recording function for a field environment is achieved.

After the pre-installed App in the smart phone is opened, the App immediately calls a mobile phone camera to enter a shooting state (a picture generated by conversion is displayed on a mobile phone screen), a measurer can observe position transformation of a specific field scene through the mobile phone screen in real time, and the App does not call a mobile phone storage space for storing image data and the generated picture during field shooting.

In the color temperature measuring method, when the environment color temperature value Y of a field environment is calculated, the App calls and reads the storage space of the mobile phone, so that the environment color temperature value Y corresponding to the field environment can be stored, and in the storage process, the App automatically names the environment color temperature value Y of the field scene

The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents and improvements made within the spirit and principle of the present invention are intended to be included within the scope of the present invention.

19页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种基于多光谱图像探测技术的环境色温测试方法及系统

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!