CN110849589B - Method for detecting optocoupler by using ADC (analog to digital converter), intelligent projector and related product - Google Patents

Method for detecting optocoupler by using ADC (analog to digital converter), intelligent projector and related product Download PDF

Info

Publication number
CN110849589B
CN110849589B CN201910937201.7A CN201910937201A CN110849589B CN 110849589 B CN110849589 B CN 110849589B CN 201910937201 A CN201910937201 A CN 201910937201A CN 110849589 B CN110849589 B CN 110849589B
Authority
CN
China
Prior art keywords
slopes
value
adc
voltage values
adc voltage
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.)
Active
Application number
CN201910937201.7A
Other languages
Chinese (zh)
Other versions
CN110849589A (en
Inventor
潘志伟
胡震宇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Anhui huole Intelligent Technology Co.,Ltd.
Original Assignee
Shenzhen Huole Science and Technology Development Co Ltd
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 Shenzhen Huole Science and Technology Development Co Ltd filed Critical Shenzhen Huole Science and Technology Development Co Ltd
Priority to CN201910937201.7A priority Critical patent/CN110849589B/en
Publication of CN110849589A publication Critical patent/CN110849589A/en
Application granted granted Critical
Publication of CN110849589B publication Critical patent/CN110849589B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01MTESTING STATIC OR DYNAMIC BALANCE OF MACHINES OR STRUCTURES; TESTING OF STRUCTURES OR APPARATUS, NOT OTHERWISE PROVIDED FOR
    • G01M11/00Testing of optical apparatus; Testing structures by optical methods not otherwise provided for
    • G01M11/02Testing optical properties

Landscapes

  • Chemical & Material Sciences (AREA)
  • Analytical Chemistry (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Controls And Circuits For Display Device (AREA)
  • Control Of Indicators Other Than Cathode Ray Tubes (AREA)
  • Transforming Electric Information Into Light Information (AREA)

Abstract

The embodiment of the application discloses a method for detecting an optocoupler by using an ADC (analog to digital converter) and a related product, which are applied to an intelligent projector, wherein the method comprises the following steps: the intelligent projector detects the voltage value of the ADC; the intelligent projector calculates to obtain an illumination intensity value according to the ADC voltage value; the intelligent projector estimates the blocking level between the light emitting component and the photoresistor according to the illumination intensity value, and controls the playing state of the intelligent projector according to the blocking level. The technical scheme provided by the application has the advantage of high user experience.

Description

Method for detecting optocoupler by using ADC (analog to digital converter), intelligent projector and related product
Technical Field
The application relates to the technical field of electronics, in particular to a method for detecting an optocoupler by using an ADC (analog-to-digital converter), an intelligent projector and a related product.
Background
Projection technology is commonly used in people's daily life. The projection system is used everywhere in meetings, teaching or entertainment venues. In the application of using the photoelectric coupler for stroke detection, the conventional method is to use GPIO to detect whether the light source is blocked, if the voltage of all blocked GPIOs is 3.3V, the detection value is 1, and if the GPIOs is not blocked at all, the voltage of the GPIO is 0V, the detection value is 0. However, in the actual use process, only part of light is blocked, and at this time, uncertainty exists when the GPIO is used for judging the state, and if the GPIO is used in a scene with a high precision requirement, the requirements of a user cannot be met.
Disclosure of Invention
The embodiment of the application provides a method for detecting an optocoupler by using an ADC (analog to digital converter), an intelligent projector and related products, which can meet the requirement of high precision and improve the user experience.
In a first aspect, an embodiment of the present application provides a method for detecting an optocoupler by using an ADC, where the method is applied to an intelligent projector, and the method includes:
the intelligent projector detects the voltage value of the ADC;
the intelligent projector calculates to obtain an illumination intensity value according to the ADC voltage value;
the intelligent projector estimates the blocking level between the light emitting component and the photoresistor according to the illumination intensity value, and controls the playing state of the intelligent projector according to the blocking level.
In a second aspect, an optical coupler device for detecting using an ADC is provided, which is applied to an intelligent projector, the device including:
the detection unit is used for detecting the voltage value of the ADC;
the processing unit is used for calculating to obtain an illumination intensity value according to the ADC voltage value; and estimating the blocking level between the light emitting part and the photoresistor according to the illumination intensity value, and controlling the playing state of the intelligent projector according to the blocking level.
In a third aspect, an embodiment of the present application provides an intelligent projector, including a processor, a memory, a communication interface, and one or more programs, where the one or more programs are stored in the memory and configured to be executed by the processor, and the program includes instructions for executing the steps in the first aspect of the embodiment of the present application.
In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, where the computer-readable storage medium stores a computer program for electronic data exchange, where the computer program enables a computer to perform some or all of the steps described in the first aspect of the embodiment of the present application.
In a fifth aspect, embodiments of the present application provide a computer program product, where the computer program product includes a non-transitory computer-readable storage medium storing a computer program, where the computer program is operable to cause a computer to perform some or all of the steps as described in the first aspect of the embodiments of the present application. The computer program product may be a software installation package.
The embodiment of the application has the following beneficial effects:
it can be seen that the technical scheme of this application detects the state of opto-coupler through the ADC, with the opto-coupler state from 0 and 1 two kinds of states, improve to 0 ~ 255 kind of forms, improve greatly and detect the precision, furthest elimination error.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a schematic structural diagram of an intelligent projector according to an embodiment of the present application.
Fig. 1a is a schematic circuit diagram of a photo resistor provided in the present application.
Fig. 2 is a schematic flowchart of a method for detecting an optocoupler by using an ADC according to an embodiment of the present application.
Fig. 3 is a schematic structural diagram of an apparatus for detecting an opto-coupler using an ADC according to an embodiment of the present application;
fig. 4 is a block diagram of hardware components of an intelligent projector according to an embodiment of the present disclosure.
Detailed Description
The terms "first," "second," and the like in the description and claims of the present application and in the above-described drawings are used for distinguishing between different objects and not for describing a particular order. Furthermore, the terms "include" and "have," as well as any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those steps or elements listed, but may alternatively include other steps or elements not listed, or inherent to such process, method, article, or apparatus.
Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the application. The appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. It is explicitly and implicitly understood by one skilled in the art that the embodiments described herein can be combined with other embodiments.
In order to make the technical solutions of the present application better understood, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The projector mainly comprises a light source, a light condensing system and a plane reflector. The light generated by the light source firstly passes through a light-gathering system of the projector, is gathered and then is emitted to the plane reflector, and is reflected into parallel light by the plane reflector to be mapped onto the screen, so that the projection function is realized.
The light-gathering system of projector is formed from light-gathering lens, auxiliary light-gathering lens, screw lens and carrying glass. The screw lens, also called Fresnel lens, is composed of two thin flat organic glass plates carved with concentric screw threads, and has large caliber, light weight and good light transmittance, and can play the role of a large-caliber convex lens. But it can only operate below 70 c and beyond this temperature it causes distortion and reduces the life of the projector. The auxiliary condenser or crescent moon mirror is positioned between the light source and the condenser, and plays a role in reducing the surface temperature of the Fresnel lens. The object carrying glass is positioned on the threaded lens, so that the projection film can be projected, written and demonstrated by some experiments or teaching aids.
The flat mirror functions to convert vertical light from the light source to horizontal so that it can be projected onto a screen. The plane mirror also plays an important role in the use of the entire projector, and if the projector is used without the plane mirror being opened, the light emitted by the light source will be reflected back to the light source after passing through the spotlight, which will increase the temperature inside the projector and on the surface of the light source, and reduce the life of the projector. Therefore, when the projector is used, the plane mirror is opened, so that the direction of light can be changed, images or videos can be mapped on a screen, and the mission of the projector is completed.
There are also some important electrical and ventilation devices in projectors, such as transformers and fans. The transformer is used to convert 220V commercial power into 24V AC voltage for projection lamp. Most projection lamps are 24V/300W bromine tungsten lamps, and the temperature in the projector lamps rises during the working process, so a squirrel cage fan is needed to reduce the temperature in the projector lamps, and a large amount of heat generated during the working process of the projection lamps is timely discharged out of the body so as to avoid damaging screw lenses and electrical equipment.
As shown in fig. 1, fig. 1 is a schematic structural diagram of an intelligent projector according to an embodiment of the present application. The smart projector may include a Processor, a Memory, a Signal Processor (DSP), a transceiver, a speaker, a microphone, a Random Access Memory (RAM), a camera, a sensor, a network module, and so on. The storage, the DSP, the projection device, the loudspeaker, the microphone, the RAM, the camera, the sensor and the network module are connected with the processor, and the transceiver is connected with the signal processor.
The Processor is a control center of the intelligent projector, various interfaces and lines are used for connecting all parts of the whole intelligent projector, various functions and Processing data of the intelligent projector are executed by operating or executing software programs and/or modules stored in the memory and calling data stored in the memory, so that the intelligent projector is monitored integrally, and the Processor can be a Central Processing Unit (CPU), a Graphic Processing Unit (GPU) or a Network Processor (NPU).
Further, the processor may integrate an application processor, which mainly handles operating systems, user interfaces, application programs, etc., and a modem processor, which mainly handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor.
The storage is used for storing software programs and/or modules, and the processor executes various functional applications and data processing of the intelligent projector by running the software programs and/or modules stored in the storage. The memory mainly comprises a program storage area and a data storage area, wherein the program storage area can store an operating system, a software program required by at least one function and the like; the storage data area may store data created according to the use of the smart projector, and the like. Further, the memory may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.
Wherein the sensor comprises at least one of: light-sensitive sensors, gyroscopes, infrared proximity sensors, vibration detection sensors, pressure sensors, etc. Among them, the light sensor, also called an ambient light sensor, is used to detect the ambient light brightness. The light sensor may include a light sensitive element and an analog to digital converter. The photosensitive element is used for converting collected optical signals into electric signals, and the analog-to-digital converter is used for converting the electric signals into digital signals. Optionally, the light sensor may further include a signal amplifier, and the signal amplifier may amplify the electrical signal converted by the photosensitive element and output the amplified electrical signal to the analog-to-digital converter. The photosensitive element may include at least one of a photodiode, a phototransistor, a photoresistor, and a silicon photocell.
The camera may be a visible light camera (general view angle camera, wide angle camera), an infrared camera, or a dual camera (having a distance measurement function), which is not limited herein.
The network module may be at least one of: a bluetooth module, a wireless fidelity (Wi-Fi), etc., which are not limited herein, and the projection apparatus can implement a projection function.
Above-mentioned intelligent projecting apparatus can also include multiunit LED stroboscopic lamp.
The projector described above and shown in fig. 1 may be a projector based on the following principle.
(1) Solid-state lasers are used as light sources: the service life of the laser light source can reach more than 20000 hours, and the one-time investment is large, so that the laser light source is free of replacement for a long time;
(2) DLP projection is adopted: the principle of DLP projection is that a plurality of small mirrors are used, each small mirror controls the light angle to realize different intensity control, and emitted light is emitted onto a curtain through a lens to form a pattern. DLP projections have higher ANSI contrast than LCD projections.
(3) The projection principle of the reflective short focus is adopted: the distance of half a meter can project 100 inches of pictures, and is more suitable for the needs of small-sized families pursuing large pictures.
The projector as shown in fig. 1 may implement the following steps:
the intelligent projector detects the voltage value of the ADC;
the intelligent projector calculates to obtain an illumination intensity value according to the ADC voltage value;
the intelligent projector estimates the blocking level between the light emitting component and the photoresistor according to the illumination intensity value, and controls the playing state of the intelligent projector according to the blocking level.
In an alternative solution, the estimating, by the smart projector, the blocking level between the light emitting component and the photo resistor according to the illumination intensity value specifically includes:
and querying a corresponding list through the illumination intensity value to determine the blocking level corresponding to the illumination intensity value.
In an optional scheme, the calculating, by the intelligent projector, the illumination intensity value according to the ADC voltage value specifically includes:
the intelligent projector collects n ADC voltage values in a preset time period, calculates slopes between two adjacent ADC voltage values of the n ADC voltage values to obtain n-1 slopes, selects w slopes larger than a first threshold value from the n-1 slopes, deletes a second point in the w slopes to obtain n-w ADC voltage values if the w slopes are all non-adjacent slopes, calculates an average value of the n-w ADC voltage values, and multiplies a conversion coefficient according to the average value to obtain the illumination intensity value.
In an optional scheme, the calculating, by the intelligent projector, the illumination intensity value according to the ADC voltage value specifically includes:
the intelligent projector collects n ADC voltage values in a preset time period, calculates slopes between two adjacent ADC voltage values of the n ADC voltage values to obtain n-1 slopes, selects w slopes larger than a first threshold from the n-1 slopes, extracts p adjacent slopes if the w slopes include adjacent slopes, extracts a first point and a last point from the p adjacent slopes, calculates an x-th slope of the first point and the last point, and if the x-th slope is smaller than the first threshold, deletes a middle point of the p adjacent slopes and a second point of the w-p slopes to obtain residual ADC voltage values, calculates an average value of the residual ADC voltage values, and multiplies a conversion coefficient according to the average value to obtain the illumination intensity value.
In an optional aspect, the method further comprises:
the projector acquires a first picture, acquires a plurality of environmental parameter values, performs gray processing on the first picture to obtain a gray image, extracts the lowest gray value and the highest gray value of the gray image, calculates the gray difference value between the highest gray value and the lowest gray value, calculates the average value of the plurality of environmental parameter values, queries from a scene list according to the gray difference value and the average value to obtain a first scene, and extracts a list corresponding to the first scene.
Referring to fig. 1a, fig. 1a provides a schematic circuit diagram of a photoresistor, as shown in fig. 1a, including: a resistor, a photoresistor, a capacitor, a triode, a switch and a power supply, wherein,
one end of photo resistance Rp is connected to this resistance R1's one end, the negative pole of power U is connected to the other end of photo resistance Rp, the one end of switch K is connected to this resistance R1's the other end, switch K's the other end connect the positive pole of power U, electric capacity C is parallelly connected with photo resistance Rp, the one end of this triode T's base photo resistance Rp, power U's negative pole is connected to triode T's projecting pole, triode T's collecting electrode connecting resistance R2's the other end, resistance R2's one end connecting resistance R1's the other end.
For the circuit shown in fig. 1a, if the photo resistor is completely blocked, the resistance of the former GPIO is the maximum, the GPIO is at a high level of 3.3V, the output is 1, otherwise, the voltage of the GPIO is 0, and the detection value is 0, but in practical application, since the corresponding light cannot be completely blocked, that is, a part of light is transmitted through the photo resistor, the voltage of the GPIO is between 0 and 3.3V, and thus the projector cannot acquire whether the corresponding light spot coupler is blocked, which affects the user experience.
Referring to fig. 2, fig. 2 provides a method for detecting optocoupler by using an ADC, where the method is implemented by using the smart projector shown in fig. 1, and the technical scenario used by the method may include: a home scene, a company scene, or an outdoor scene, which may be other scenes in practical application, but the present application does not limit the scene implemented by the intelligent projector, and the method, as shown in fig. 2, includes the following steps:
step S201, the intelligent projector detects an ADC voltage value;
the implementation method of step S201 may be implemented by a voltage detection device, for example, a voltmeter, and certainly in practical applications, other manners may also be adopted to detect the voltage value of the ADC.
Step S202, the intelligent projector calculates to obtain an illumination intensity value according to the ADC voltage value;
the implementation method for calculating the illumination intensity value according to the ADC voltage value by the intelligent projector may specifically include:
the intelligent projector collects n ADC voltage values in a preset time period, calculates slopes between two adjacent ADC voltage values of the n ADC voltage values to obtain n-1 slopes, selects w slopes larger than a first threshold value from the n-1 slopes, deletes a second point in the w slopes to obtain n-w ADC voltage values if the w slopes are all non-adjacent slopes, calculates an average value of the n-w ADC voltage values, and multiplies a conversion coefficient according to the average value to obtain the illumination intensity value.
Optionally, the implementation method for calculating the illumination intensity value according to the ADC voltage value by the intelligent projector specifically may include:
the intelligent projector collects n ADC voltage values in a preset time period, calculates slopes between two adjacent ADC voltage values of the n ADC voltage values to obtain n-1 slopes, selects w slopes larger than a first threshold from the n-1 slopes, extracts p adjacent slopes if the w slopes include adjacent slopes, extracts a first point and a last point from the p adjacent slopes, calculates an x-th slope of the first point and the last point, and if the x-th slope is smaller than the first threshold, deletes a middle point of the p adjacent slopes and a second point of the w-p slopes to obtain residual ADC voltage values, calculates an average value of the residual ADC voltage values, and multiplies a conversion coefficient according to the average value to obtain the illumination intensity value.
Above-mentioned technical scheme avoids the mistake sampling of ADC voltage value through n sampling, if have the mistake sampling, then its light intensity value also can be wrong, leads to final control like this to be wrong, and sets up the noise figure that n ADC voltage value can be got rid of to the voltage value of n ADC, and then improves the degree of accuracy.
Step S203, the smart projector estimates a blocking level between the light emitting component and the photo resistor according to the illumination intensity value, and controls a playing state of the smart projector according to the blocking level.
The blocking level in step S203 may be represented by 1 byte, that is, may be represented by 8 bits, that is, may be divided into 256 levels, and the relationship between the specific level and the illumination intensity value may be determined by a list, that is, the blocking level corresponding to the illumination intensity is obtained through the illumination intensity query.
The above playing states include but are not limited to: normal play, stop play, increase play illumination intensity, reduce play illumination intensity.
The technical scheme of this application detects the state of opto-coupler through the ADC, with the opto-coupler state from 0 and 1 two kinds of states, improves to 0 ~ 255 kind of forms, improves greatly and detects the precision, furthest elimination error.
In an alternative, the list may be determined according to a scene, that is, a corresponding scene is determined, and the list corresponding to the scene is determined according to the scene.
The specific scheme for determining the corresponding scene may include:
the projector acquires a first picture, acquires a plurality of environmental parameter values, performs gray processing on the first picture to obtain a gray image, extracts the lowest gray value and the highest gray value of the gray image, calculates the gray difference value between the highest gray value and the lowest gray value, calculates the average value of the plurality of environmental parameter values, and queries from a scene list according to the gray difference value and the average value to obtain a first scene.
The environmental parameter may be at least one of: ambient brightness, ambient color temperature, humidity, temperature, geographical location, environmental background, etc. do not limit here, and in concrete implementation, electronic equipment may be provided with an environmental sensor, can gather environmental parameter based on environmental sensor, and environmental sensor may be at least one of following: an ambient light sensor, a color temperature sensor, a humidity sensor, a position sensor, an image sensor, and the like, without limitation. The preset quality evaluation value may be stored in the electronic device in advance, and may be set by the user or default by the system. The electronic device may also pre-store a mapping relationship between a preset environmental parameter and an optical fingerprint identification threshold. The preset pattern may be a nine-square grid, a four-square grid, a sixteen-square grid, or the like, which is not limited herein.
Optionally, after step S203, the method may further include:
the projector determines a gesture of a target object, and controls the progress of playing resources according to the gesture, and the method specifically includes: if the gesture is determined to be left sliding according to the change condition, controlling the display content of the display screen to page left; if the gesture is determined to be right sliding, controlling the play resource to fast forward; and if the gesture is determined to be right sliding, controlling the playing resource to fast backward, if the gesture is determined to be upward sliding, controlling the playing resource to pause, and if the gesture is determined to be downward sliding, controlling the playing resource to select the next playing resource.
The gesture may be determined in various ways, for example, in an alternative embodiment, the gesture is determined by ultrasonic waves, and a specific ultrasonic gesture determination method may include:
the method includes the steps of obtaining multiple transmitting moments of the first ultrasonic signals with multiple frequencies, multiple receiving moments of the second ultrasonic signals and multiple received signal strengths, and determining gestures according to the multiple transmitting moments, the multiple receiving moments of the ultrasonic signals and the multiple received signal strengths.
The gestures may also be determined in other manners, for example, the up and down gestures may be determined by means of picture recognition, and a specific implementation method may include:
the method comprises the steps of collecting a first picture and a second picture at intervals of set time, identifying the first picture to determine a first pupil center point coordinate and a first hand coordinate, identifying the second picture to determine a second pupil center point coordinate and a second hand coordinate, calculating a difference value between the first pupil center point coordinate and the first hand coordinate to obtain a first difference value, calculating a difference value between the second pupil center point coordinate and the second hand coordinate to obtain a second difference value, determining that a gesture moves upwards if the second difference value is larger than the first difference value, and determining that the gesture moves downwards if the second difference value is smaller than the first difference value.
Of course, in the subsequent implementation, the control of the projector may also be implemented by brain waves.
Brain wave (Brain wave) is data obtained by recording Brain activity using electrophysiological indicators, and is formed by summing the postsynaptic potentials generated synchronously by a large number of neurons during Brain activity. It records the electrical wave changes during brain activity, which is a general reflection of the electrophysiological activity of brain neurons on the surface of the cerebral cortex or scalp.
The brain waves are spontaneous rhythmic nerve electrical activities with frequency ranging from 1 to 30 times per second, and are generally divided into four bands by frequency, namely, delta (1-3 Hz), theta (4-7 Hz), alpha (8-13 Hz), and beta (14-30 Hz). In addition, when a certain event is focused, a gamma wave with a frequency higher than that of a beta wave is often seen, the frequency is 30-80 Hz, and the amplitude range is indefinite; other normal brain waves with special waveforms, such as hump wave, sigma wave, lambda wave, kappa-complex wave, mu wave, etc., can also appear during sleep.
The identification scheme for brain waves may specifically include:
collecting first brain wave data of a target object, analyzing the first brain wave data to determine whether the first brain wave data has beta waves, if so, continuing to play the video resource, and if not, replacing the video resource.
The principle of the setting is that, for the waveform analysis of the brain waves, the applicant analyzes the brain waves in combination with a medical institution and actually compares the waveform analysis with the medical institution to find that the fluctuation frequency of the brain waves has a direct relationship with whether the user pays attention to the information, and the direct representation of the fluctuation frequency can be specifically whether the user has beta waves or not.
The parameters of the projector can be modified through brain wave data, and a specific implementation method of the method can include:
the projector displays a menu, if the menu comprises a plurality of parameter information, x variable parameter values are extracted from the parameter information, a first neural network model corresponding to the menu is extracted, electroencephalogram data are collected, G amplitudes and G frequencies are collected from the electroencephalogram data, the G amplitudes and the G frequencies form an input matrix CI H W, H is a height value of the input matrix, W is a width value of the input matrix, CI is a depth value of the input matrix, the input matrix CI H W is subjected to multi-layer forward operation to obtain an output result of the forward operation, a modified y parameter is determined from the menu according to the output result, and a modified interface corresponding to the y parameter is displayed.
Each of x is an integer of 2 or more.
Determining the modified yth parameter from the menu according to the output result may specifically include:
and extracting a position P corresponding to the maximum value of the output result, and determining the y-th parameter corresponding to the position P.
The position P may be a depth value, a width value, and a height value of the data block of the maximum output result.
Specifically, the maximum value of a plurality of elements in the forward calculation result matrix is extracted, the position P (i.e., the values of CI, H, and W) of the forward calculation result matrix corresponding to the maximum value is extracted, and if the maximum value is greater than a set threshold value, the y-th parameter corresponding to the position P is determined to be started. For example, if CI ═ 1, H ═ 1, and W ═ 1 (i.e., the first position in the first row of the forward operation result matrix) correspond to the 1 st parameter, if the maximum value is greater than the set threshold value, it is determined that the modified page corresponding to the 1 st parameter is activated.
The forming of the input matrix CI × H × W with the G amplitudes and the G frequencies may specifically include:
e.g. 2G ═ CI0*H0*W0In the case of/2, G amplitudes and G frequencies are combined into a matrix CI0*H0/2*W0Will matrix CI0*H0/2*W0Inserting data CI every other row in H direction0*W0Obtaining an input matrix CI0*H0*W0The insertion data is an average value of two elements adjacent in the H direction. Specifically, if the data of the H-direction 2 nd line is inserted, the inserted data is an average value of the H-direction 1 st line and the H-direction 3 rd line. The above CI0*H0*W0The value may specifically be a preset value of the neural network model (the preset value may be determined by sample training or may be set by a user), and specifically, the value of the CI corresponding to the neural network model is0H W may be: CI0=16;H0=32;W010. Of course, in practical application, CI can also be adopted0、H0、W0Other values are also possible.
The technical scheme is that the number of elements of the input data matrix is increased by inserting data, specifically, the inserted data is an average value of adjacent rows, and if the inserted data is the last row of data, the inserted data can be values of the adjacent rows. Where (H1+ H2)/2 represents an average value between the first row and the second row in the insertion H direction. Wherein H1 represents the value of the first row in the H direction, H2 represents the value of the second row, the way of inserting data is exemplified by the data of row 2 and the last row, and the way of inserting data for the middle row can be realized by referring to the way of inserting data for row 2.
Referring to fig. 3, fig. 3 provides a method for detecting an optocoupler by using an ADC, applied to a smart projector, the method including:
a detection unit 301 for detecting an ADC voltage value;
a processing unit 302, configured to calculate an illumination intensity value according to the ADC voltage value; and estimating the blocking level between the light emitting part and the photoresistor according to the illumination intensity value, and controlling the playing state of the intelligent projector according to the blocking level.
The technical scheme of this application detects the state of opto-coupler through the ADC, with the opto-coupler state from 0 and 1 two kinds of states, improves to 0 ~ 255 kind of forms, improves greatly and detects the precision, furthest elimination error.
In an optional technical solution, the processing unit 302 is configured to query a corresponding list through the illumination intensity value to determine a blocking level corresponding to the illumination intensity value.
In an optional technical solution, the processing unit 302 is configured to collect n ADC voltage values in a preset time period, calculate slopes between two adjacent ADC voltage values of the n ADC voltage values to obtain n-1 slopes, select w slopes greater than a first threshold from the n-1 slopes, delete a second point of the w slopes to obtain n-w ADC voltage values if the w slopes are all non-adjacent slopes, calculate an average value of the n-w ADC voltage values, and multiply a conversion coefficient by the average value to obtain the illumination intensity value.
In an optional technical solution, the processing unit 302 is configured to collect n ADC voltage values in a preset time period, calculate slopes between two adjacent ADC voltage values of the n ADC voltage values to obtain n-1 slopes, select w slopes greater than a first threshold from the n-1 slopes, extract p adjacent slopes if the w slopes include adjacent slopes, extract a first point and a last point from the p adjacent slopes, calculate an xth slope of the first point and the last point, delete a middle point of the p adjacent slopes and a second point of the w-p slopes to obtain remaining ADC voltage values if the xth slope is smaller than the first threshold, calculate an average value of the remaining ADC voltage values, and multiply a conversion coefficient according to the average value to obtain the illumination intensity value.
In an optional technical solution, the processing unit 302 is configured to acquire a first picture, acquire a plurality of environmental parameter values, perform gray scale processing on the first picture to obtain a gray scale image, extract a lowest gray scale value and a highest gray scale value of the gray scale image, calculate a gray scale difference between the highest gray scale value and the lowest gray scale value, calculate an average value of the plurality of environmental parameter values, obtain a first scene by querying from a scene list according to the gray scale difference and the average value, and extract a list corresponding to the first scene.
Referring to fig. 4, fig. 4 an embodiment of the present application provides an intelligent projector including a processor, a memory, a communication interface, and one or more programs, where the one or more programs are stored in the memory and configured to be executed by the processor, and the program includes instructions for performing the following steps.
The intelligent projector detects the voltage value of the ADC;
the intelligent projector calculates to obtain an illumination intensity value according to the ADC voltage value;
the intelligent projector estimates the blocking level between the light emitting component and the photoresistor according to the illumination intensity value, and controls the playing state of the intelligent projector according to the blocking level.
In an alternative solution, the estimating, by the smart projector, the blocking level between the light emitting component and the photo resistor according to the illumination intensity value specifically includes:
and querying a corresponding list through the illumination intensity value to determine the blocking level corresponding to the illumination intensity value.
In an optional scheme, the calculating, by the intelligent projector, the illumination intensity value according to the ADC voltage value specifically includes:
the intelligent projector collects n ADC voltage values in a preset time period, calculates slopes between two adjacent ADC voltage values of the n ADC voltage values to obtain n-1 slopes, selects w slopes larger than a first threshold value from the n-1 slopes, deletes a second point in the w slopes to obtain n-w ADC voltage values if the w slopes are all non-adjacent slopes, calculates an average value of the n-w ADC voltage values, and multiplies a conversion coefficient according to the average value to obtain the illumination intensity value.
In an optional scheme, the calculating, by the intelligent projector, the illumination intensity value according to the ADC voltage value specifically includes:
the intelligent projector collects n ADC voltage values in a preset time period, calculates slopes between two adjacent ADC voltage values of the n ADC voltage values to obtain n-1 slopes, selects w slopes larger than a first threshold from the n-1 slopes, extracts p adjacent slopes if the w slopes include adjacent slopes, extracts a first point and a last point from the p adjacent slopes, calculates an x-th slope of the first point and the last point, and if the x-th slope is smaller than the first threshold, deletes a middle point of the p adjacent slopes and a second point of the w-p slopes to obtain residual ADC voltage values, calculates an average value of the residual ADC voltage values, and multiplies a conversion coefficient according to the average value to obtain the illumination intensity value.
In an optional aspect, the method further comprises:
the projector acquires a first picture, acquires a plurality of environmental parameter values, performs gray processing on the first picture to obtain a gray image, extracts the lowest gray value and the highest gray value of the gray image, calculates the gray difference value between the highest gray value and the lowest gray value, calculates the average value of the plurality of environmental parameter values, queries from a scene list according to the gray difference value and the average value to obtain a first scene, and extracts a list corresponding to the first scene.
Embodiments of the present application also provide a computer storage medium, wherein the computer storage medium stores a computer program for electronic data exchange, the computer program enabling a computer to execute part or all of the steps of any one of the methods as described in the above method embodiments, and the computer includes an intelligent projector.
Embodiments of the present application also provide a computer program product comprising a non-transitory computer readable storage medium storing a computer program operable to cause a computer to perform some or all of the steps of any of the methods as described in the above method embodiments. The computer program product may be a software installation package, said computer comprising a smart projector.
It should be noted that, for simplicity of description, the above-mentioned method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present application is not limited by the order of acts described, as some steps may occur in other orders or concurrently depending on the application. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required in this application.
In the foregoing embodiments, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus may be implemented in other manners. For example, the above-described embodiments of the apparatus are merely illustrative, and for example, the above-described division of the units is only one type of division of logical functions, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of some interfaces, devices or units, and may be an electric or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit may be stored in a computer readable memory if it is implemented in the form of a software functional unit and sold or used as a stand-alone product. Based on such understanding, the technical solution of the present application may be substantially implemented or a part of or all or part of the technical solution contributing to the prior art may be embodied in the form of a software product stored in a memory, and including several instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the above-mentioned method of the embodiments of the present application. And the aforementioned memory comprises: a U-disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic or optical disk, and other various media capable of storing program codes.
Those skilled in the art will appreciate that all or part of the steps in the methods of the above embodiments may be implemented by associated hardware instructed by a program, which may be stored in a computer-readable memory, which may include: flash Memory disks, Read-Only memories (ROMs), Random Access Memories (RAMs), magnetic or optical disks, and the like.
The foregoing detailed description of the embodiments of the present application has been presented to illustrate the principles and implementations of the present application, and the above description of the embodiments is only provided to help understand the method and the core concept of the present application; meanwhile, for a person skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application.

Claims (8)

1. A method for detecting optocoupler by using an ADC (analog-to-digital converter), which is applied to an intelligent projector, comprises the following steps:
the intelligent projector detects the voltage value of the ADC;
the intelligent projector calculates to obtain an illumination intensity value according to the ADC voltage value;
the intelligent projector estimates the blocking level between the light emitting component and the photoresistor according to the illumination intensity value, and controls the playing state of the intelligent projector according to the blocking level;
the step of calculating the illumination intensity value by the intelligent projector according to the ADC voltage value specifically comprises the following steps:
the intelligent projector collects n ADC voltage values in a preset time period, calculates slopes between two adjacent ADC voltage values of the n ADC voltage values to obtain n-1 slopes, selects w slopes larger than a first threshold value from the n-1 slopes, deletes a second point in the w slopes to obtain n-w ADC voltage values if the w slopes are all non-adjacent slopes, calculates an average value of the n-w ADC voltage values, and multiplies a conversion coefficient according to the average value to obtain the illumination intensity value.
2. The method of claim 1, wherein said smart projector inferring a level of blocking between the light emitting component and the photo-resistor from the illumination intensity values comprises:
and querying a corresponding list through the illumination intensity value to determine the blocking level corresponding to the illumination intensity value.
3. The method of claim 1, wherein the calculating the illumination intensity value by the smart projector according to the ADC voltage value specifically comprises:
the intelligent projector collects n ADC voltage values in a preset time period, calculates slopes between two adjacent ADC voltage values of the n ADC voltage values to obtain n-1 slopes, selects w slopes larger than a first threshold from the n-1 slopes, extracts p adjacent slopes if the w slopes include adjacent slopes, extracts a first point and a last point from the p adjacent slopes, calculates an x-th slope of the first point and the last point, deletes a middle point of the p adjacent slopes and a second point of the w-p slopes to obtain residual ADC voltage values if the x-th slope is smaller than the first threshold, calculates an average value of the residual ADC voltage values, and multiplies a conversion coefficient by the average value to obtain the illumination intensity value.
4. The method of claim 2, further comprising:
the projector acquires a first picture, acquires a plurality of environmental parameter values, performs gray processing on the first picture to obtain a gray image, extracts the lowest gray value and the highest gray value of the gray image, calculates the gray difference value between the highest gray value and the lowest gray value, calculates the average value of the plurality of environmental parameter values, queries from a scene list according to the gray difference value and the average value to obtain a first scene, and extracts a list corresponding to the first scene.
5. An optical coupling device using ADC detection, applied to an intelligent projector, the device comprising:
the detection unit is used for detecting the voltage value of the ADC;
the processing unit is used for calculating to obtain an illumination intensity value according to the ADC voltage value; presume the blocking grade between light-emitting part and photoresistor according to the intensity value of the illumination, control the broadcast state of the intellectual projector according to the blocking grade;
the processing unit is specifically configured to collect n ADC voltage values in a preset time period, calculate slopes between two adjacent ADC voltage values of the n ADC voltage values to obtain n-1 slopes, select w slopes greater than a first threshold from the n-1 slopes, delete a second point of the w slopes to obtain n-w ADC voltage values if the w slopes are all non-adjacent slopes, calculate an average value of the n-w ADC voltage values, and multiply a conversion coefficient by the average value to obtain the illumination intensity value.
6. The apparatus of claim 5,
the processing unit is specifically configured to collect n ADC voltage values in a preset time period, calculate slopes between two adjacent ADC voltage values of the n ADC voltage values to obtain n-1 slopes, select w slopes greater than a first threshold from the n-1 slopes, extract p adjacent slopes if the w slopes include adjacent slopes, extract a first point and a last point from the p adjacent slopes, calculate an xth slope of the first point and the last point, delete a middle point of the p adjacent slopes and a second point of the w-p slopes to obtain remaining ADC voltage values if the xth slope is smaller than the first threshold, calculate an average value of the remaining ADC voltage values, and multiply a conversion coefficient by the average value to obtain the illumination intensity value.
7. An intelligent projector comprising a processor, a memory for storing one or more programs and configured to be executed by the processor, the programs comprising instructions for performing the steps in the method of any of claims 1-4.
8. A computer-readable storage medium, characterized in that a computer program for electronic data exchange is stored, wherein the computer program causes a computer to perform the method according to any one of claims 1-4.
CN201910937201.7A 2019-09-29 2019-09-29 Method for detecting optocoupler by using ADC (analog to digital converter), intelligent projector and related product Active CN110849589B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910937201.7A CN110849589B (en) 2019-09-29 2019-09-29 Method for detecting optocoupler by using ADC (analog to digital converter), intelligent projector and related product

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910937201.7A CN110849589B (en) 2019-09-29 2019-09-29 Method for detecting optocoupler by using ADC (analog to digital converter), intelligent projector and related product

Publications (2)

Publication Number Publication Date
CN110849589A CN110849589A (en) 2020-02-28
CN110849589B true CN110849589B (en) 2021-02-26

Family

ID=69597301

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910937201.7A Active CN110849589B (en) 2019-09-29 2019-09-29 Method for detecting optocoupler by using ADC (analog to digital converter), intelligent projector and related product

Country Status (1)

Country Link
CN (1) CN110849589B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6498440B2 (en) * 2000-03-27 2002-12-24 Gentex Corporation Lamp assembly incorporating optical feedback
JP4072450B2 (en) * 2003-02-28 2008-04-09 キヤノン株式会社 Solid-state imaging device for AEAF
CN107947123A (en) * 2017-10-24 2018-04-20 深圳市必易微电子有限公司 ACDC protective circuit of switch power source and ACDC switching power units
CN108848360A (en) * 2018-06-21 2018-11-20 Oppo广东移动通信有限公司 Smart projector throws screen control method and Related product
CN208506274U (en) * 2018-05-14 2019-02-15 成都市极米科技有限公司 Detection circuit in place in a kind of projector
CN110021257A (en) * 2019-04-02 2019-07-16 Oppo广东移动通信有限公司 Display brightness method of adjustment and relevant device
CN110186656A (en) * 2019-07-02 2019-08-30 德州可视激光科技有限公司 Laser-projector coupler splitting ratio real-time detection apparatus

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6498440B2 (en) * 2000-03-27 2002-12-24 Gentex Corporation Lamp assembly incorporating optical feedback
JP4072450B2 (en) * 2003-02-28 2008-04-09 キヤノン株式会社 Solid-state imaging device for AEAF
CN107947123A (en) * 2017-10-24 2018-04-20 深圳市必易微电子有限公司 ACDC protective circuit of switch power source and ACDC switching power units
CN208506274U (en) * 2018-05-14 2019-02-15 成都市极米科技有限公司 Detection circuit in place in a kind of projector
CN108848360A (en) * 2018-06-21 2018-11-20 Oppo广东移动通信有限公司 Smart projector throws screen control method and Related product
CN110021257A (en) * 2019-04-02 2019-07-16 Oppo广东移动通信有限公司 Display brightness method of adjustment and relevant device
CN110186656A (en) * 2019-07-02 2019-08-30 德州可视激光科技有限公司 Laser-projector coupler splitting ratio real-time detection apparatus

Also Published As

Publication number Publication date
CN110849589A (en) 2020-02-28

Similar Documents

Publication Publication Date Title
JP5786254B2 (en) Method and apparatus for controlling light emitting devices in a terminal device, and terminal device
CN101334578B (en) Image photographing apparatus, image photographing method, and computer program
KR20200134374A (en) Modeling method for image signal processor, and electronic device
US20200260022A1 (en) System and method for event camera data processing
WO2015162605A2 (en) System and method for controlling a camera based on processing an image captured by other camera
CN101118366A (en) Image sensing apparatus and control method therefor
JP2010004118A (en) Digital photograph frame, information processing system, control method, program, and information storage medium
US10261393B2 (en) Method for controlling infrared illuminator and related image-recording device
CN101325658A (en) Imaging device, imaging method and computer program
WO2021004216A1 (en) Parameter adjustment method and apparatus for depth sensor, and electronic device
WO2020172888A1 (en) Image processing method and device
WO2018198502A1 (en) Illuminance sensor, proximity sensor, electronic device, and surveillance system
TW201042577A (en) Motion image data generator, system using motion image data, and methods thereof
CN111654643B (en) Exposure parameter determination method and device, unmanned aerial vehicle and computer readable storage medium
KR20200016559A (en) Apparatus and method for generating a moving image data including multiple sections image of the electronic device
US20170126966A1 (en) Photography method using gaze detection
CN113853044A (en) Illumination control method, system, storage medium, illumination terminal and desk lamp
CN110849589B (en) Method for detecting optocoupler by using ADC (analog to digital converter), intelligent projector and related product
CN102804204A (en) Geture recognition using chroma- keying
CN109040729B (en) Image white balance correction method and device, storage medium and terminal
CN111182208A (en) Photographing method and device, storage medium and electronic equipment
US11881018B2 (en) Detecting dual band infrared light source for object tracking
CN110602827A (en) Kara OK light effect implementation method, intelligent projector and related product
KR102351496B1 (en) Image processing apparatus and method for operating thereof
TWI397024B (en) Method for image auto-selection and computer system

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
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20211222

Address after: 241060 room 453, 4th floor, electronic industrial park complex building, Jiujiang Economic Development Zone, Jiujiang District, Wuhu City, Anhui Province

Patentee after: Anhui huole Intelligent Technology Co.,Ltd.

Address before: No.01, 10 / F, unit 4, building B, Kexing Science Park, No.15 Keyuan Road, Central District, Nanshan District, Shenzhen, Guangdong 518000

Patentee before: SHENZHEN HOLATEK Co.,Ltd.

TR01 Transfer of patent right