CN116400952A - Camera control method, device, equipment and storage medium - Google Patents

Camera control method, device, equipment and storage medium Download PDF

Info

Publication number
CN116400952A
CN116400952A CN202310331083.1A CN202310331083A CN116400952A CN 116400952 A CN116400952 A CN 116400952A CN 202310331083 A CN202310331083 A CN 202310331083A CN 116400952 A CN116400952 A CN 116400952A
Authority
CN
China
Prior art keywords
target camera
sub
camera
interface
target
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310331083.1A
Other languages
Chinese (zh)
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.)
Guangdong Topstar Technology Co Ltd
Original Assignee
Guangdong Topstar Technology 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 Guangdong Topstar Technology Co Ltd filed Critical Guangdong Topstar Technology Co Ltd
Priority to CN202310331083.1A priority Critical patent/CN116400952A/en
Publication of CN116400952A publication Critical patent/CN116400952A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/36Software reuse
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44505Configuring for program initiating, e.g. using registry, configuration files

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Studio Devices (AREA)

Abstract

The invention discloses a camera control method, a device, equipment and a storage medium, wherein the method comprises the following steps: selecting a target camera from the candidate cameras, and acquiring a target brand identification of the target camera and a target camera identification; selecting a target camera sub-interface from candidate camera sub-interfaces provided by the unified camera interface for candidate camera brands according to the target brand identification, and giving function content to sub-interface functions required to be set in the target camera sub-interfaces according to the target camera identification; starting a target camera by adopting a function of a starting camera sub-interface in a target camera sub-interface according to the target camera identification; acquiring an image acquisition mode of the target camera by adopting a reading triggering mode sub-function in a target camera sub-interface according to the target camera identification; and controlling the target camera to acquire images by adopting a target camera sub-interface according to the target camera identification and the image acquisition mode, and acquiring images acquired by the target camera by adopting a read image data sub-interface function in the target camera sub-interface.

Description

Camera control method, device, equipment and storage medium
Technical Field
The present invention relates to the field of mapping technologies, and in particular, to a method, an apparatus, a device, and a storage medium for controlling a camera.
Background
With the rapid development of science and technology, vision measurement and detection technology is increasingly widely used in the field of automation, and the core of vision software for acquiring images is an area-array camera or a linear-array camera.
At present, the brands of cameras on the market are numerous, and cameras of different brands or a plurality of cameras of the same brand are required to be used in the same visual software, so that the development of the cameras in the existing visual software is complex, and the reusability of a camera module is low.
Disclosure of Invention
The invention provides a camera control method, a camera control device, camera control equipment and a storage medium, which are used for reducing the development difficulty of a camera in visual software and improving the reusability of a camera module in the visual software.
According to an aspect of the present invention, there is provided a camera control method including:
selecting a target camera from the candidate cameras, and acquiring a target brand identification of the target camera and a target camera identification;
selecting a target camera sub-interface from candidate camera sub-interfaces provided by the unified camera interface for candidate camera brands according to the target brand identification, and giving function content to sub-interface functions required to be set in the target camera sub-interfaces according to the target camera identification; the sub-interface functions at least comprise a starting camera sub-interface function, a reading triggering mode sub-interface function and a reading image data sub-interface function;
Starting a target camera by adopting a function of a starting camera sub-interface in a target camera sub-interface according to the target camera identification;
acquiring an image acquisition mode of the target camera by adopting a reading triggering mode sub-function in a target camera sub-interface according to the target camera identification;
and controlling the target camera to acquire images by adopting a target camera sub-interface according to the target camera identification and the image acquisition mode, and acquiring images acquired by the target camera by adopting a read image data sub-interface function in the target camera sub-interface.
According to another aspect of the present invention, there is provided a camera control apparatus including:
the identification acquisition module is used for selecting a target camera from the candidate cameras and acquiring a target brand identification and a target camera identification of the target camera;
the function assignment module is used for selecting a target camera sub-interface from candidate camera sub-interfaces provided by the unified camera interface for the candidate camera brands according to the target brand identification, and assigning function contents to sub-interface functions required to be set in the target camera sub-interfaces according to the target camera identification; the sub-interface functions at least comprise a starting camera sub-interface function, a reading triggering mode sub-interface function and a reading image data sub-interface function;
The camera starting module is used for starting the target camera by adopting a starting camera sub-interface function in the target camera sub-interface according to the target camera identification;
the acquisition mode acquisition module is used for acquiring an image acquisition mode of the target camera by adopting a reading triggering mode sub-function in a sub-interface of the target camera according to the target camera identification;
and the image acquisition module is used for controlling the target camera to acquire images by adopting a target camera subinterface according to the target camera identification and the image acquisition mode, and acquiring images acquired by the target camera by adopting a read image data subinterface function in the target camera subinterface.
According to another aspect of the present invention, there is provided an electronic apparatus including:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,,
the memory stores a computer program executable by the at least one processor to enable the at least one processor to perform the camera control method of any one of the embodiments of the present invention.
According to another aspect of the present invention, there is provided a computer-readable storage medium storing computer instructions for causing a processor to execute a camera control method of any one of the embodiments of the present invention.
According to the technical scheme, the target camera is selected from the candidate cameras, and the target brand identification and the target camera identification of the target camera are obtained; selecting a target camera sub-interface from candidate camera sub-interfaces provided by the unified camera interface for candidate camera brands according to the target brand identification, and giving function content to sub-interface functions required to be set in the target camera sub-interfaces according to the target camera identification; the sub-interface functions at least comprise a starting camera sub-interface function, a reading triggering mode sub-interface function and a reading image data sub-interface function; starting a target camera by adopting a function of a starting camera sub-interface in a target camera sub-interface according to the target camera identification; acquiring an image acquisition mode of the target camera by adopting a reading triggering mode sub-function in a target camera sub-interface according to the target camera identification; and controlling the target camera to acquire images by adopting a target camera sub-interface according to the target camera identification and the image acquisition mode, and acquiring images acquired by the target camera by adopting a read image data sub-interface function in the target camera sub-interface. According to the technical scheme, a unified camera interface is provided for cameras of different brands or a plurality of cameras of the same brand in the vision software, so that the development difficulty of the cameras in the vision software is reduced; according to the target brand identification, selecting a target camera sub-interface from a plurality of candidate camera sub-interfaces in the unified camera interface, so that the vision software can call a plurality of cameras of different brands or the same brand at the same time, and redundant operation of the vision software is reduced; meanwhile, function content is endowed to the sub-interface function to be set in the sub-interface of the target camera according to the target camera identification in a targeted manner, so that targeted calling and personalized setting of different cameras under the same camera brand are realized, the reusability of a camera module in the vision software is improved, and the application scene of the vision software is increased; furthermore, according to the target camera identification and the image acquisition mode of the target camera, the target camera sub-interface is adopted to control the target camera to acquire the image, so that the flexibility of acquiring the image by the target camera is improved.
It should be understood that the description in this section is not intended to identify key or critical features of the embodiments of the invention or to delineate the scope of the invention. Other features of the present invention will become apparent from the description that follows.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for the description of the embodiments will be briefly described below, and it is apparent that the drawings in the following description are only some embodiments of the present invention, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a flowchart of a camera control method according to a first embodiment of the present invention;
fig. 2 is a flowchart of a camera control method according to a second embodiment of the present invention;
fig. 3 is a flowchart of a camera control method according to a third embodiment of the present invention;
fig. 4 is a schematic structural diagram of a camera control apparatus according to a fourth embodiment of the present invention;
fig. 5 is a schematic structural diagram of an electronic device implementing a camera control method according to an embodiment of the present invention.
Detailed Description
In order that those skilled in the art will better understand the present invention, a technical solution in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in which it is apparent that the described embodiments are only some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present invention without making any inventive effort, shall fall within the scope of the present invention.
It should be noted that the term "object" and the like in the description of the present invention and the claims and the above drawings are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the invention described herein may be implemented in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
In addition, it should be noted that, in the technical solution of the present invention, the related processes of collection, storage, use, processing, transmission, provision, disclosure, etc. of the target brand mark and the target camera mark all conform to the regulations of the related laws and regulations, and do not violate the public welfare.
Example 1
Fig. 1 is a flowchart of a camera control method according to a first embodiment of the present invention, where the method may be performed by a camera control device, the device may be implemented in hardware and/or software, and the device may be configured in an electronic device, and the electronic device may be a vision software workstation. As shown in fig. 1, the method includes:
s101, selecting a target camera from the candidate cameras, and acquiring a target brand identification of the target camera and a target camera identification.
Wherein, candidate cameras may refer to all cameras associated in the vision software. The target camera may refer to a selected one of the candidate cameras. The target brand identification is used to uniquely identify the camera brand of a target camera. The target camera identification is used to uniquely identify one target camera.
Specifically, according to actual working requirements, a target camera is selected from candidate cameras associated with visual software, and a target brand identification and a target camera identification of the target camera are obtained from default settings of the target camera.
S102, selecting a target camera sub-interface from candidate camera sub-interfaces provided by the unified camera interface for candidate camera brands according to the target brand identification, and giving function content to sub-interface functions required to be set in the target camera sub-interface according to the target camera identification; the sub-interface functions at least comprise a starting camera sub-interface function, a reading triggering mode sub-interface function and a reading image data sub-interface function.
Wherein the unified camera interface comprises at least one camera sub-interface of a camera brand for making distributed calls to at least one camera in the visual software. The candidate camera brand may refer to a camera brand to which the candidate camera corresponds. The candidate camera sub-interfaces may refer to camera sub-interfaces corresponding to candidate camera brands in the unified camera interface. The target camera sub-interface may refer to a selected one of the candidate camera sub-interfaces.
It should be noted that, for each camera brand, the camera sub-interfaces corresponding to the camera brand at least include a start-up camera sub-interface function, a read trigger mode sub-interface function and a read image data sub-interface function, and different function contents can be given to the sub-interface functions to be set in the target camera sub-interfaces according to actual working requirements of different cameras under the camera brand.
The starting camera sub-interface function is used for starting a target camera corresponding to the target camera identifier, loading a configuration file of the target camera, default parameters and a callback function of the starting target camera; the callback function is used for storing images acquired by the target camera. The reading triggering mode sub-interface function is used for acquiring an image acquisition mode of the target camera corresponding to the target camera identification. The read image data sub-interface function is used for acquiring an image acquired by the target camera corresponding to the target camera identifier.
It should be noted that, the sub-interface function may be preset according to a specified format, and be used for specifically controlling the target camera to perform image acquisition. Illustratively, the startup camera subinterface function in the target camera subinterface is set to opencamera_n (int ID) in a specified format; wherein n represents a target brand identifier, ID represents a target camera identifier, and int ID represents that the data type of the target camera identifier is integer; setting a read trigger mode subinterface function in a target camera subinterface to be getcamera mode_n (int ID, int×value); wherein n represents a target brand identifier, ID represents a target camera identifier, int ID represents that the data type of the target camera identifier is integer, value represents an image acquisition mode of the target camera, int Value represents that the data type of the image acquisition mode of the target camera is integer, for example, arabic numeral "1" is used to represent an image acquisition mode 1 of the target camera; setting a read image data subinterface function in a target camera subinterface to snap_n (int ID); where n represents a target brand identity, ID represents a target camera identity int ID represents that the data type of the target camera identity is integer.
Exemplary, if there are n candidate camera brands, namely camera brand 1, camera brands 2, … …, camera brand n, and there are m cameras under each camera brand, the camera identifications of these cameras are respectively ID 1 ,ID 2 ,……,ID m N candidate camera sub-interfaces are respectively selected from the unified camera interfaces, namely a candidate camera sub-interface 1, candidate camera sub-interfaces 2 and … … and a candidate camera sub-interface n; if the target brand identification is 2, the target camera identification is ID 1 Selecting a candidate camera sub-interface 2 from candidate camera sub-interfaces provided by the unified camera interface for the candidate camera brands as a target camera sub-interface, and identifying an ID according to the target camera 1 And giving function content to the subinterface functions needing to be set in the target camera subinterface. Wherein n and m are positive integers.
It can be understood that, selecting the target camera sub-interface from the candidate camera sub-interfaces provided by the unified camera interface for the candidate camera brands according to the target brand identification can realize the call of all cameras under the camera brands corresponding to the target brand identification, and meanwhile, the camera resources under other camera brands do not need to be initialized, so that the memory resources are saved, and the running efficiency of the vision software is improved; meanwhile, function content is endowed to the sub-interface function to be set in the sub-interface of the target camera according to the target camera identification, and the target camera corresponding to the target camera identification can be subjected to targeted sub-interface function setting, so that more application scenes can be better met.
Optionally, after selecting the target camera sub-interface from the candidate camera sub-interfaces provided by the unified camera interface for the candidate camera brands according to the target brand identifier of the target camera, setting and function assignment may be performed on the sub-interface function in the target camera sub-interface without according to the target camera identifier, and the target camera may be controlled to perform image acquisition directly by using the sub-interface function preset in the target camera sub-interface.
S103, starting the target camera by adopting a starting camera sub-interface function in the target camera sub-interface according to the target camera identification.
Specifically, a starting camera sub-interface function in the target camera sub-interface starts a target camera corresponding to the target camera identifier, and loads a configuration file, default parameters and a callback function of the starting target camera of the target camera.
S104, acquiring an image acquisition mode of the target camera by adopting a reading triggering mode sub-function in a target camera sub-interface according to the target camera identification.
Specifically, a reading triggering mode sub-function in the target camera sub-interface acquires an image acquisition mode of the target camera corresponding to the target camera identifier.
S105, controlling the target camera to acquire images by adopting a target camera subinterface according to the target camera identification and the image acquisition mode, and acquiring images acquired by the target camera by adopting a read image data subinterface function in the target camera subinterface.
Specifically, the target camera sub-interface controls the target camera corresponding to the target camera identifier to acquire an image according to the image acquisition mode according to the target camera identifier and the image acquisition mode, and acquires the image acquired by the target camera corresponding to the target camera identifier by adopting a read image data sub-interface function in the target camera sub-interface.
According to the technical scheme, the target camera is selected from the candidate cameras, and the target brand identification and the target camera identification of the target camera are obtained; selecting a target camera sub-interface from candidate camera sub-interfaces provided by the unified camera interface for candidate camera brands according to the target brand identification, and giving function content to sub-interface functions required to be set in the target camera sub-interfaces according to the target camera identification; the sub-interface functions at least comprise a starting camera sub-interface function, a reading triggering mode sub-interface function and a reading image data sub-interface function; starting a target camera by adopting a function of a starting camera sub-interface in a target camera sub-interface according to the target camera identification; acquiring an image acquisition mode of the target camera by adopting a reading triggering mode sub-function in a target camera sub-interface according to the target camera identification; and controlling the target camera to acquire images by adopting a target camera sub-interface according to the target camera identification and the image acquisition mode, and acquiring images acquired by the target camera by adopting a read image data sub-interface function in the target camera sub-interface. According to the technical scheme, a unified camera interface is provided for cameras of different brands or a plurality of cameras of the same brand in the vision software, so that the development difficulty of the cameras in the vision software is reduced; according to the target brand identification, selecting a target camera sub-interface from a plurality of candidate camera sub-interfaces in the unified camera interface, so that the vision software can call a plurality of cameras of different brands or the same brand at the same time, and redundant operation of the vision software is reduced; meanwhile, function content is endowed to the sub-interface function to be set in the sub-interface of the target camera according to the target camera identification in a targeted manner, so that targeted calling and personalized setting of different cameras under the same camera brand are realized, the reusability of a camera module in the vision software is improved, and the application scene of the vision software is increased; furthermore, according to the target camera identification and the image acquisition mode of the target camera, the target camera sub-interface is adopted to control the target camera to acquire the image, so that the flexibility of acquiring the image by the target camera is improved.
On the basis of the above embodiment, as an optional manner of the embodiment of the present invention, the target camera sub-interface further includes a camera initialization sub-interface function, a read parameter sub-interface function, and a set frame status sub-interface function.
The camera initialization sub-interface function is used for loading dynamic library functions provided by all cameras under a camera brand corresponding to the target brand identification, setting the camera identifications of all cameras under the camera brand in an enumeration mode, and one camera identification corresponds to one camera under the camera brand. The read parameter subinterface function is used for acquiring parameters of the target camera corresponding to the target camera identifier, such as exposure, gain, frame rate, width and height of the image when the target camera corresponding to the target camera identifier acquires the image, and the like. The set frame state sub-interface function is used for setting the frame state of the image data when the target camera corresponding to the target camera identifier collects the image.
Illustratively, the camera initialization subinterface function in the target camera subinterface is set to initcamera scan_n (); setting a read parameter subinterface function in a target camera subinterface to be GetCameraPara_n (int ID, int Type, int_Value); wherein n represents a target brand identifier, ID represents a target camera identifier, int ID represents a data Type of the target camera identifier as integer, type represents a parameter of a target camera corresponding to the target camera identifier, int Type represents a data Type of a target camera parameter corresponding to the target camera identifier as integer, value represents a Value of the target camera parameter corresponding to the target camera identifier, and int Value represents a data Type of a target camera parameter Value corresponding to the target camera identifier as integer; setting a set frame state subinterface function in the target camera subinterface to setframerate_n (int ID, bool Value); wherein n represents a target brand identifier, ID represents a target camera identifier, value represents a frame state of image data when the target camera corresponding to the target camera identifier collects images, and the bol Value represents a data type of the frame state of the image data when the target camera corresponding to the target camera identifier collects images, namely, the Value of the Value can be false or true.
Example two
Fig. 2 is a flowchart of a camera control method according to a second embodiment of the present invention, where an alternative implementation manner is provided for further optimization of "controlling a target camera to collect an image by using a target camera sub-interface according to a target camera identifier and an image collection manner" based on the above embodiment. In the embodiments of the present invention, parts not described in detail may be referred to for related expressions of other embodiments. As shown in fig. 2, the method includes:
s201, selecting a target camera from the candidate cameras, and acquiring a target brand identification of the target camera and a target camera identification.
S202, selecting a target camera sub-interface from candidate camera sub-interfaces provided by a unified camera interface for candidate camera brands according to target brand identifiers, and giving function contents to sub-interface functions required to be set in the target camera sub-interfaces according to the target camera identifiers; the sub-interface functions at least comprise a starting camera sub-interface function, a reading triggering mode sub-interface function and a reading image data sub-interface function.
S203, starting the target camera by adopting a starting camera sub-interface function in the target camera sub-interface according to the target camera identification.
In an alternative embodiment, the sub-interface functions to be set in the target camera sub-interface further include a setting parameter sub-interface function and a setting trigger mode sub-interface function; accordingly, after the target camera is started by using the startup camera subinterface function in the target camera subinterface, the method may further include: setting initial parameters of a target camera by adopting a setting parameter subinterface function in a target camera subinterface; wherein the initial parameters include exposure, gain, frame rate, width, and height; setting an image acquisition mode of the target camera by adopting a setting triggering mode subinterface function in the target camera subinterface; the image acquisition mode is a continuous acquisition mode, a soft trigger mode or an IO trigger acquisition mode.
The parameter setting sub-interface function is used for setting parameters of the target camera corresponding to the target camera identification. And setting a trigger mode sub-interface function for setting an image acquisition mode of the target camera corresponding to the target camera identifier. Illustratively, setting a setting parameter subinterface function in a target camera subinterface as setcamera para_n (int ID, int Type, int Value) according to a specified format; wherein n represents a target brand identifier, ID represents a target camera identifier, type represents a parameter of a target camera corresponding to the target camera identifier, int Type represents that a data Type of the target camera parameter corresponding to the target camera identifier is integer, value represents a Value of the target camera parameter corresponding to the target camera identifier, and int Value represents that a data Type of the target camera parameter Value corresponding to the target camera identifier is integer; setting a setting triggering mode subinterface function in a target camera subinterface to be set CameraMode_n (int ID, int Value); wherein n represents a target brand identifier, ID represents a target camera identifier, int ID represents that the data type of the target camera identifier is integer, value represents the image acquisition mode of the target camera, int Value represents that the data type of the image acquisition mode of the target camera is integer, for example, arabic numeral "1" is used to represent the image acquisition mode 1 of the target camera.
Specifically, the initial parameters of the target camera corresponding to the target camera identifier are set by using a setting parameter subinterface function in the target camera subinterface, for example, exposure, gain, frame rate, width and height of the image and the like when the target camera corresponding to the target camera identifier collects the image, and meanwhile, the image collection mode of the target camera corresponding to the target camera identifier is set by using a setting triggering mode subinterface function in the target camera subinterface.
The optional embodiment provides a method for setting the parameters of the target camera and the image acquisition mode after the target camera is started, so that the method for controlling the target camera to acquire the image by adopting the sub-interface of the target camera is more intelligent, the requirements of users can be better met, and the use experience of the users is further improved.
S204, acquiring an image acquisition mode of the target camera by adopting a reading triggering mode sub-function in a target camera sub-interface according to the target camera identification.
The image acquisition mode can be one of a continuous acquisition mode, a soft trigger acquisition mode and an IO trigger acquisition mode. The continuous acquisition mode can be a mode of continuously exposing a camera and acquiring images in real time; the soft trigger acquisition mode can refer to a mode of actively inquiring signals through software and acquiring images under the condition of detecting corresponding signals; the IO trigger acquisition mode may be a mode of performing image acquisition after the camera receives an IO acquisition request signal.
S205, under the condition that the image acquisition mode is a soft trigger acquisition mode, the sub-interface function to be set in the target camera sub-interface also comprises a soft trigger sub-interface function, and according to the target camera identification, the soft trigger sub-interface function in the target camera sub-interface is adopted to send a soft trigger instruction to the target camera, so that the target camera acquires the image according to the soft trigger instruction.
The soft triggering sub-interface function is used for sending a soft triggering instruction to the target camera corresponding to the target camera identifier.
Specifically, under the condition that the image acquisition mode is a soft trigger acquisition mode, the sub-interface function to be set in the target camera sub-interface further comprises a soft trigger sub-interface function, and the soft trigger sub-interface function in the target camera sub-interface is adopted to send a soft trigger instruction to the target camera corresponding to the target camera identifier, so that the target camera corresponding to the target camera identifier performs image acquisition according to the soft trigger instruction.
In an alternative embodiment, under the condition that the image acquisition mode is an IO trigger acquisition mode, acquiring an IO acquisition request signal, and controlling a target camera to acquire images by adopting a target camera sub-interface according to the IO acquisition request signal and the target camera identifier.
Specifically, under the condition that the image acquisition mode is an IO trigger acquisition mode, acquiring an IO acquisition request signal; and the target camera sub-interface controls a target camera corresponding to the target camera identifier to acquire images according to the acquired IO acquisition request signal and the target camera identifier.
The embodiment provides a specific method for controlling the target camera to acquire the image by adopting the target camera sub-interface under the condition that the image acquisition mode is the IO trigger acquisition mode, enriches the method for controlling the target camera to acquire the image by adopting the target camera sub-interface, and further improves the flexibility of the target camera to acquire the image.
In another alternative embodiment, in the case that the image acquisition mode is a continuous acquisition mode, the target camera sub-interface is used to control the target camera corresponding to the target camera identifier to acquire the image, and no other operation is needed.
S206, acquiring an image acquired by the target camera by adopting a read image data sub-interface function in the target camera sub-interface.
In an alternative embodiment, the sub-interface functions to be set in the target camera sub-interface further include a read frame status sub-interface function; correspondingly, the acquiring the image acquired by the target camera by using the read image data subinterface function in the camera subinterface may be: reading the frame state of the image data in a callback function of the target camera by adopting a read frame state sub-interface function in a sub-interface of the target camera; and acquiring an image acquired by the target camera by adopting a read image data subinterface function in the target camera subinterface according to the frame state of the image data.
The read frame state sub-interface function is used for acquiring the frame state of the image data when the target camera corresponding to the target camera identifier collects the image. Illustratively, the read frame status subinterface function in the target camera subinterface is set to getframerate_n (int ID, pool Value) in a specified format; wherein n represents a target brand identity; ID represents a target camera identity; * Value represents a frame state of image data when the target camera corresponding to the target camera identifier collects an image, and bol Value represents that a data type of the frame state of the image data when the target camera corresponding to the target camera identifier collects an image is boolean type, that is, a Value of Value may be false or true.
When the target camera sub-interface is used to control the target camera to collect the image, the frame state of the image data is set to false by default when the target camera collects the image.
Specifically, a frame state of image data in a callback function of the target camera corresponding to the target camera identification is read by adopting a frame state reading sub-interface function in the target camera sub-interface; under the condition that the frame state of the image data is true, acquiring an image acquired by a target camera corresponding to the target camera identifier by adopting a read image data subinterface function in a target camera subinterface; when the frame state of the image data is false, the image acquired by the target camera corresponding to the target camera identifier cannot be acquired, which indicates that the image acquisition by the target camera corresponding to the target camera identifier fails.
The optional embodiment provides a specific method for acquiring the image acquired by the target camera by adopting the function of the image data reading sub-interface in the camera sub-interface, which can judge whether the image acquired by the target camera is successful or not according to the frame state of the image data in the target camera, and acquire the image acquired by the target camera under the condition that the frame state of the image data in the target camera is true, thereby being convenient for a user to use, reducing redundant operations of controlling the target camera to acquire the image and acquiring the image by adopting the target camera sub-interface, and improving the efficiency of image acquisition.
According to the technical scheme, the specific method for controlling the target camera to acquire the images by adopting the target camera sub-interface under different image acquisition modes is provided, the method for controlling the target camera to acquire the images by adopting the target camera sub-interface is enriched, and the flexibility of acquiring the images by the target camera is further improved; after the target camera is started, a specific method for setting initial parameters and an image acquisition mode of the target camera is provided, so that the use experience of a user is enhanced; the specific method for acquiring the image acquired by the target camera by adopting the function of the sub-interface of the image data read in the sub-interface of the target camera is provided, the image acquired by the target camera is acquired under the condition that the frame state of the image data in the target camera is true, the use of a user is facilitated, the redundant operation of controlling the target camera to acquire the image and acquiring the image by adopting the sub-interface of the target camera is reduced, and the efficiency of image acquisition is improved.
On the basis of the above embodiment, as an alternative manner of the embodiment of the present invention, after the image acquired by the target camera is acquired by using the read image data subinterface function in the camera subinterface, it may further include: closing the target camera by adopting a function for closing a sub-interface of the camera in the sub-interface of the target camera according to the target brand identification and the target camera identification; and exiting the camera corresponding to the target brand identity by adopting a camera exiting sub-interface function in the target camera sub-interface.
The camera closing sub-interface function is used for closing a target camera corresponding to the target camera identification. The camera exit sub-interface function is used to exit all cameras under the camera brand corresponding to the target brand identity.
The selectable mode perfects the whole flow of controlling the target camera to collect images and acquiring images collected by the target camera by adopting the target camera sub-interface, closes the target camera under the condition of not using the target camera, and exits all cameras under the camera brands corresponding to the target brand identification when the camera under the camera brands corresponding to the target brand identification is not used, thereby reducing the occupancy rate of memory resources in the visual software workbench and improving the running efficiency of the visual software.
Example III
Fig. 3 is a flowchart of a camera control method according to a third embodiment of the present invention, and a preferred embodiment is provided based on the foregoing embodiment. In the embodiments of the present invention, parts not described in detail may be referred to for related expressions of other embodiments. As shown in fig. 3, the method includes:
s301, selecting a target camera from the candidate cameras, and acquiring a target brand identification of the target camera and a target camera identification.
S302, selecting a target camera sub-interface from candidate camera sub-interfaces provided by the unified camera interface for candidate camera brands according to the target brand identification, and giving function content to sub-interface functions required to be set in the target camera sub-interface according to the target camera identification; the sub-interface functions at least comprise a starting camera sub-interface function, a reading triggering mode sub-interface function and a reading image data sub-interface function.
S303, starting the target camera by adopting a starting camera sub-interface function in the target camera sub-interface according to the target camera identification.
S304, setting initial parameters of the target camera by adopting a setting parameter subinterface function in the target camera subinterface; and setting an image acquisition mode of the target camera by adopting a setting triggering mode subinterface function in the target camera subinterface.
It should be noted that, setting the parameter sub-interface function and setting the trigger mode sub-interface function needs to be preset in the target camera sub-interface according to the target camera identifier, and give corresponding function content.
S305, acquiring an image acquisition mode of the target camera by adopting a reading triggering mode sub-function in a target camera sub-interface according to the target camera identification.
S306, under the condition that the image acquisition mode is a soft trigger acquisition mode, the sub-interface function to be set in the target camera sub-interface also comprises a soft trigger sub-interface function, and according to the target camera identification, the soft trigger sub-interface function in the target camera sub-interface is adopted to send a soft trigger instruction to the target camera, so that the target camera acquires the image according to the soft trigger instruction.
S307, under the condition that the image acquisition mode is an IO trigger acquisition mode, acquiring an IO acquisition request signal, and controlling a target camera to acquire images by adopting a target camera sub-interface according to the IO acquisition request signal and the target camera identification.
S308, under the condition that the image acquisition mode is a continuous acquisition mode, the target camera sub-interface directly controls the target camera corresponding to the target camera identifier to acquire the image without other operations.
S309, under the condition that the frame state of the image data in the callback function of the target camera is true, acquiring the image acquired by the target camera by adopting the sub-interface function for reading the image data in the sub-interface of the target camera.
In addition, under the condition that the frame state of the image data in the callback function of the target camera is false, the image acquired by the target camera corresponding to the target camera identification cannot be acquired, and the failure of acquiring the image by the target camera corresponding to the target camera identification is indicated.
S310, closing the target camera by adopting a function of closing the sub-interface of the target camera according to the target camera identification.
It should be noted that if the target camera sub-interface is used to control the target camera to collect the image, and the read image data sub-interface function in the target camera sub-interface is used to obtain the image collected by the target camera, and then the target camera is selected not to be closed, S304 may be executed again.
S311, according to the target brand identification, a camera exit sub-interface function in the target camera sub-interface is adopted to exit the camera corresponding to the target brand identification.
If the camera corresponding to the target brand identity is selected not to exit, S301 is executed again.
According to the technical scheme, a unified camera interface is provided for cameras of different brands or a plurality of cameras of the same brand in visual software, and a target camera sub-interface is selected from a plurality of candidate camera sub-interfaces in the unified camera interface according to a target brand identification; meanwhile, a sub-interface function in a sub-interface of the target camera is called according to the target camera identification to control the target camera to collect images, and the images collected by the target camera are obtained, so that the vision software can call a plurality of cameras of different brands or the same brand at the same time, the development difficulty of the cameras in the vision software is reduced, and the development period of the cameras in the vision software is shortened; meanwhile, the targeted calling and personalized setting of different cameras under the same camera brand are realized, the reusability of camera modules in the visual software is improved, and the application scene of the visual software is increased; moreover, the technical scheme of the embodiment of the invention also provides a method for setting the parameters of the target camera, the image acquisition mode, closing the target camera and exiting all cameras under the target brand mark, so that the flexibility of the target camera in acquiring the images is improved, the occupancy rate of memory resources in the visual software workbench is reduced, and the running efficiency of the visual software is improved.
Example IV
Fig. 4 is a schematic structural diagram of a camera control device according to a fourth embodiment of the present invention. The embodiment is applicable to the case of capturing images using automated vision software, the apparatus may be implemented in hardware and/or software, the apparatus may be configured in an electronic device, and the electronic device may be a vision software workstation. As shown in fig. 4, the apparatus includes:
an identification obtaining module 401, configured to select a target camera from the candidate cameras, and obtain a target brand identification of the target camera and a target camera identification;
the function assignment module 402 is configured to select a target camera sub-interface from candidate camera sub-interfaces provided by the unified camera interface for the candidate camera brands according to the target brand identifier, and assign function content to sub-interface functions to be set in the target camera sub-interfaces according to the target camera identifier; the sub-interface functions at least comprise a starting camera sub-interface function, a reading triggering mode sub-interface function and a reading image data sub-interface function;
a camera starting module 403, configured to start the target camera according to the target camera identifier by using a starting camera subinterface function in the target camera subinterface;
The acquisition mode acquisition module 404 is configured to acquire, according to the target camera identifier, an image acquisition mode of the target camera by using a read trigger mode sub-function in the target camera sub-interface;
the image acquisition module 405 is configured to control the target camera to acquire an image by using the target camera sub-interface according to the target camera identifier and the image acquisition mode, and acquire the image acquired by the target camera by using a function of the read image data sub-interface in the target camera sub-interface.
According to the technical scheme, the target brand identification of the target camera and the target camera identification are acquired through the identification acquisition module; selecting a target camera sub-interface from candidate camera sub-interfaces provided by the unified camera interface for candidate camera brands according to the target brand identification through a function assignment module, and assigning function contents to sub-interface functions required to be set in the target camera sub-interfaces according to the target camera identification; the sub-interface functions at least comprise a starting camera sub-interface function, a reading triggering mode sub-interface function and a reading image data sub-interface function; starting a target camera through a camera starting module; acquiring an image acquisition mode of a target camera through an acquisition mode acquisition module; and controlling the target camera to acquire images by adopting a target camera subinterface according to the target camera identification and the image acquisition mode through an image acquisition module, and acquiring images acquired by the target camera by adopting a read image data subinterface function in the target camera subinterface. According to the technical scheme, a unified camera interface is provided for cameras of different brands or a plurality of cameras of the same brand in the vision software, so that the development difficulty of the cameras in the vision software is reduced; according to the target brand identification, selecting a target camera sub-interface from a plurality of candidate camera sub-interfaces in the unified camera interface, so that the vision software can call a plurality of cameras of different brands or the same brand at the same time, and redundant operation of the vision software is reduced; meanwhile, function content is endowed to the sub-interface function to be set in the sub-interface of the target camera according to the target camera identification in a targeted manner, so that targeted calling and personalized setting of different cameras under the same camera brand are realized, the reusability of a camera module in the vision software is improved, and the application scene of the vision software is increased; furthermore, according to the target camera identification and the image acquisition mode of the target camera, the target camera sub-interface is adopted to control the target camera to acquire the image, so that the flexibility of acquiring the image by the target camera is improved.
Optionally, the image acquisition module 405 is specifically configured to:
under the condition that the image acquisition mode is a soft trigger acquisition mode, the sub-interface function to be set in the target camera sub-interface also comprises a soft trigger sub-interface function, and according to the target camera identification, the soft trigger sub-interface function in the target camera sub-interface is adopted to send a soft trigger instruction to the target camera, so that the target camera can acquire the image according to the soft trigger instruction.
Optionally, the image acquisition module 405 is specifically configured to:
under the condition that the image acquisition mode is an IO triggering acquisition mode, acquiring an IO acquisition request signal, and controlling a target camera to acquire images by adopting a target camera sub-interface according to the IO acquisition request signal and the target camera identification.
Optionally, the apparatus further comprises:
the camera closing module is used for closing the target camera by adopting a function for closing the camera sub-interface in the target camera sub-interface according to the target brand identification and the target camera identification after acquiring the image acquired by the target camera by adopting the function for reading the image data sub-interface in the camera sub-interface;
and the camera exit module is used for exiting the camera corresponding to the target brand identification by adopting a camera exit sub-interface function in the target camera sub-interface.
Optionally, the sub-interface function to be set in the target camera sub-interface further includes a parameter setting sub-interface function and a trigger mode setting sub-interface function;
correspondingly, the device also comprises:
the parameter setting module is used for setting initial parameters of the target camera by adopting a setting parameter subinterface function in the target camera subinterface after the target camera is started by adopting a starting camera subinterface function in the target camera subinterface; wherein the initial parameters include exposure, gain, frame rate, width, and height;
the acquisition mode setting module is used for setting an image acquisition mode of the target camera by adopting a setting triggering mode subinterface function in the target camera subinterface; the image acquisition mode is a continuous acquisition mode, a soft trigger mode or an IO trigger acquisition mode.
Optionally, the sub-interface function to be set in the target camera sub-interface further includes a read frame status sub-interface function;
correspondingly, the image acquisition module 405 is specifically configured to:
reading the frame state of the image data in a callback function of the target camera by adopting a read frame state sub-interface function in a sub-interface of the target camera; and acquiring an image acquired by the target camera by adopting a read image data subinterface function in the target camera subinterface according to the frame state of the image data.
Optionally, the target camera sub-interface further includes a camera initialization sub-interface function, a read parameter sub-interface function, and a set frame status sub-interface function.
The camera control device provided by the embodiment of the invention can execute the camera control method provided by any embodiment of the invention, and has the corresponding functional modules and beneficial effects of executing the camera control methods.
Example five
Fig. 5 shows a schematic diagram of the structure of an electronic device 10 that may be used to implement an embodiment of the invention. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. Electronic equipment may also represent various forms of mobile devices, such as personal digital processing, cellular telephones, smartphones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the inventions described and/or claimed herein.
As shown in fig. 5, the electronic device 10 includes at least one processor 11, and a memory, such as a Read Only Memory (ROM) 12, a Random Access Memory (RAM) 13, etc., communicatively connected to the at least one processor 11, in which the memory stores a computer program executable by the at least one processor, and the processor 11 may perform various appropriate actions and processes according to the computer program stored in the Read Only Memory (ROM) 12 or the computer program loaded from the storage unit 18 into the Random Access Memory (RAM) 13. In the RAM13, various programs and data required for the operation of the electronic device 10 may also be stored. The processor 11, the ROM12 and the RAM13 are connected to each other via a bus 14. An input/output (I/O) interface 15 is also connected to bus 14.
Various components in the electronic device 10 are connected to the I/O interface 15, including: an input unit 16 such as a keyboard, a mouse, etc.; an output unit 17 such as various types of displays, speakers, and the like; a storage unit 18 such as a magnetic disk, an optical disk, or the like; and a communication unit 19 such as a network card, modem, wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information/data with other devices via a computer network, such as the internet, and/or various telecommunication networks.
The processor 11 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various specialized Artificial Intelligence (AI) computing chips, various processors running machine learning model algorithms, digital Signal Processors (DSPs), and any suitable processor, controller, microcontroller, etc. The processor 11 performs the respective methods and processes described above, for example, a camera control method.
In some embodiments, the camera control method may be implemented as a computer program tangibly embodied on a computer-readable storage medium, such as the storage unit 18. In some embodiments, part or all of the computer program may be loaded and/or installed onto the electronic device 10 via the ROM12 and/or the communication unit 19. When the computer program is loaded into the RAM13 and executed by the processor 11, one or more steps of the camera control method described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to perform the camera control method by any other suitable means (e.g. by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuit systems, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), systems On Chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs, the one or more computer programs may be executed and/or interpreted on a programmable system including at least one programmable processor, which may be a special purpose or general-purpose programmable processor, that may receive data and instructions from, and transmit data and instructions to, a storage system, at least one input device, and at least one output device.
A computer program for carrying out methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the computer programs, when executed by the processor, cause the functions/acts specified in the flowchart and/or block diagram block or blocks to be implemented. The computer program may execute entirely on the machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of the present invention, a computer-readable storage medium may be a tangible medium that can contain, or store a computer program for use by or in connection with an instruction execution system, apparatus, or device. The computer readable storage medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. Alternatively, the computer readable storage medium may be a machine readable signal medium. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) through which a user can provide input to the electronic device. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic input, speech input, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a background component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such background, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), blockchain networks, and the internet.
The computing system may include clients and servers. The client and server are typically remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, also called a cloud computing server or a cloud host, and is a host product in a cloud computing service system, so that the defects of high management difficulty and weak service expansibility in the traditional physical hosts and VPS service are overcome.
It should be appreciated that various forms of the flows shown above may be used to reorder, add, or delete steps. For example, the steps described in the present invention may be performed in parallel, sequentially, or in a different order, so long as the desired results of the technical solution of the present invention are achieved, and the present invention is not limited herein.
The above embodiments do not limit the scope of the present invention. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives are possible, depending on design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the scope of the present invention.

Claims (10)

1. A camera control method, the method comprising:
selecting a target camera from the candidate cameras, and acquiring a target brand identification and a target camera identification of the target camera;
selecting a target camera sub-interface from candidate camera sub-interfaces provided by a unified camera interface for candidate camera brands according to the target brand identification, and giving function content to a sub-interface function to be set in the target camera sub-interface according to the target camera identification; the sub-interface functions at least comprise a starting camera sub-interface function, a reading triggering mode sub-interface function and a reading image data sub-interface function;
Starting the target camera by adopting the function of the starting camera sub-interface in the target camera sub-interface according to the target camera identification;
acquiring an image acquisition mode of the target camera by adopting the reading triggering mode sub-function in the target camera sub-interface according to the target camera identifier;
and controlling the target camera to acquire images by adopting the target camera subinterface according to the target camera identification and the image acquisition mode, and acquiring the images acquired by the target camera by adopting the image data reading subinterface function in the target camera subinterface.
2. The method according to claim 1, wherein the controlling the target camera to perform image acquisition by using the target camera sub-interface according to the target camera identifier and the image acquisition mode includes:
and under the condition that the image acquisition mode is a soft trigger acquisition mode, the sub-interface function to be set in the target camera sub-interface also comprises a soft trigger sub-interface function, and according to the target camera identification, the soft trigger sub-interface function in the target camera sub-interface is adopted to send a soft trigger instruction to the target camera, so that the target camera acquires the image according to the soft trigger instruction.
3. The method according to claim 1, wherein the controlling the target camera to perform image acquisition by using the target camera sub-interface according to the target camera identifier and the image acquisition mode includes:
and under the condition that the image acquisition mode is an IO triggering acquisition mode, acquiring an IO acquisition request signal, and controlling the target camera to acquire images by adopting the target camera sub-interface according to the IO acquisition request signal and the target camera identifier.
4. The method of claim 1, further comprising, after said capturing the image captured by the target camera using the read image data subinterface function in the camera subinterface:
closing the target camera by adopting a function for closing a sub-interface of the target camera in the sub-interface according to the target brand identification and the target camera identification;
and adopting a camera exit sub-interface function in the target camera sub-interface to exit the camera corresponding to the target brand identification.
5. The method of claim 1, wherein the sub-interface functions to be set in the target camera sub-interface further comprise a set parameter sub-interface function and a set trigger mode sub-interface function;
Correspondingly, after the target camera is started by adopting the starting camera sub-interface function in the target camera sub-interface, the method further comprises the following steps:
setting initial parameters of the target camera by adopting the setting parameter subinterface function in the target camera subinterface; wherein the initial parameters include exposure, gain, frame rate, width, and height;
setting an image acquisition mode of the target camera by adopting the setting triggering mode subinterface function in the target camera subinterface; the image acquisition mode is a continuous acquisition mode, a soft trigger mode or an IO trigger acquisition mode.
6. The method of claim 1, wherein the sub-interface functions to be set in the target camera sub-interface further comprise a read frame status sub-interface function;
correspondingly, the acquiring the image acquired by the target camera by adopting the read image data subinterface function in the camera subinterface comprises the following steps:
reading the frame state of the image data in the callback function of the target camera by adopting the sub-interface function of the frame state reading sub-interface of the target camera;
and acquiring an image acquired by the target camera by adopting the read image data sub-interface function in the target camera sub-interface according to the frame state of the image data.
7. The method of claim 1, further comprising a camera initialization subinterface function, a read parameter subinterface function, and a set frame status subinterface function in the target camera subinterface.
8. A camera control apparatus, the apparatus comprising:
the identification acquisition module is used for selecting a target camera from the candidate cameras and acquiring a target brand identification and a target camera identification of the target camera;
the function assignment module is used for selecting a target camera sub-interface from candidate camera sub-interfaces provided by the unified camera interface for candidate camera brands according to the target brand identification, and assigning function contents to sub-interface functions required to be set in the target camera sub-interfaces according to the target camera identification; the sub-interface functions at least comprise a starting camera sub-interface function, a reading triggering mode sub-interface function and a reading image data sub-interface function;
the camera starting module is used for starting the target camera by adopting the starting camera sub-interface function in the target camera sub-interface according to the target camera identification;
the acquisition mode acquisition module is used for acquiring an image acquisition mode of the target camera by adopting the reading triggering mode sub-function in the target camera sub-interface according to the target camera identification;
And the image acquisition module is used for controlling the target camera to acquire images by adopting the target camera subinterface according to the target camera identification and the image acquisition mode, and acquiring the images acquired by the target camera by adopting the image reading data subinterface function in the target camera subinterface.
9. An electronic device, the electronic device comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,,
the memory stores a computer program executable by the at least one processor to enable the at least one processor to perform the camera control method of any one of claims 1-7.
10. A computer readable storage medium, characterized in that the computer readable storage medium stores computer instructions for causing a processor to implement the camera control method of any one of claims 1-7 when executed.
CN202310331083.1A 2023-03-29 2023-03-29 Camera control method, device, equipment and storage medium Pending CN116400952A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310331083.1A CN116400952A (en) 2023-03-29 2023-03-29 Camera control method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310331083.1A CN116400952A (en) 2023-03-29 2023-03-29 Camera control method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN116400952A true CN116400952A (en) 2023-07-07

Family

ID=87008485

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310331083.1A Pending CN116400952A (en) 2023-03-29 2023-03-29 Camera control method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN116400952A (en)

Similar Documents

Publication Publication Date Title
CN112712498A (en) Vehicle damage assessment method and device executed by mobile terminal, mobile terminal and medium
CN111298434B (en) Service processing method, device, equipment and storage medium
KR20220003625A (en) Performance detection method, apparatus, electronic device, computer readable medium and computer program product
CN113535541A (en) Test method, test device, storage medium and computer equipment
CN113849356B (en) Equipment testing method and device, electronic equipment and storage medium
CN112044061B (en) Game picture processing method and device, electronic equipment and storage medium
CN111506393B (en) ARM-based virtualization device and use method thereof
CN117271121A (en) Task processing progress control method, device, equipment and storage medium thereof
CN116400952A (en) Camera control method, device, equipment and storage medium
CN112988482B (en) Server operation management method, device, terminal, server and storage medium
CN114173158B (en) Face recognition method, cloud device, client device, electronic device and medium
CN113419880B (en) Cloud mobile phone root authority acquisition method, related device and computer program product
CN115599438A (en) Method, device, equipment and medium for constructing application program publishing package
CN110515834B (en) Interface testing method and device, mobile terminal and storage medium
CN113595814A (en) Message delay detection method and device, electronic equipment and storage medium
CN114115657B (en) Display mode switching method, device, equipment and medium of cloud mobile phone
CN113568687A (en) Method for displaying Web page, related equipment and computer readable storage medium
CN113128297A (en) Equipment docking method and device, electronic equipment and storage medium
CN112804073B (en) Method and device for managing terminal through main terminal
CN116363260B (en) Image generation method and device and electronic equipment
CN116820658B (en) Cloud application page rendering method, device, equipment and storage medium
CN118018405A (en) Upgrading method and device of Internet of things equipment, server and storage medium
CN114374798A (en) Scene recognition method and device, electronic equipment and computer-readable storage medium
CN117407107A (en) Image generation method, device, equipment and storage medium
CN114500519A (en) Communication method, device, equipment and storage medium based on cloud mobile phone

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