CN112653836A - Image acquisition method and device, storage medium and processor - Google Patents

Image acquisition method and device, storage medium and processor Download PDF

Info

Publication number
CN112653836A
CN112653836A CN202011468776.8A CN202011468776A CN112653836A CN 112653836 A CN112653836 A CN 112653836A CN 202011468776 A CN202011468776 A CN 202011468776A CN 112653836 A CN112653836 A CN 112653836A
Authority
CN
China
Prior art keywords
image acquisition
acquisition device
image
subclass
class
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
CN202011468776.8A
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.)
Gree Electric Appliances Inc of Zhuhai
Zhuhai Gree Intelligent Equipment Co Ltd
Original Assignee
Gree Electric Appliances Inc of Zhuhai
Zhuhai Gree Intelligent Equipment 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 Gree Electric Appliances Inc of Zhuhai, Zhuhai Gree Intelligent Equipment Co Ltd filed Critical Gree Electric Appliances Inc of Zhuhai
Priority to CN202011468776.8A priority Critical patent/CN112653836A/en
Publication of CN112653836A publication Critical patent/CN112653836A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/66Remote control of cameras or camera parts, e.g. by remote control devices
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/62Control of parameters via user interfaces
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/66Remote control of cameras or camera parts, e.g. by remote control devices
    • H04N23/661Transmitting camera control signals through networks, e.g. control via the Internet
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N7/00Television systems
    • H04N7/18Closed-circuit television [CCTV] systems, i.e. systems in which the video signal is not broadcast
    • H04N7/181Closed-circuit television [CCTV] systems, i.e. systems in which the video signal is not broadcast for receiving images from a plurality of remote sources

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Human Computer Interaction (AREA)
  • Studio Devices (AREA)

Abstract

The invention discloses an image acquisition method and device, a storage medium and a processor. Wherein, the method comprises the following steps: receiving a selection instruction, wherein the selection instruction is used for selecting a first image acquisition device from candidate image acquisition devices, and the candidate image acquisition devices are communicated with an upper computer; according to the address information of the first image acquisition device, an image acquisition device object corresponding to the first image acquisition device is established in the factory class; and calling an image acquisition subclass corresponding to the type of the first image acquisition device through the image acquisition device object so as to call the first image acquisition device to acquire images, wherein the image acquisition subclasses corresponding to the multiple types of image acquisition devices inherit the same image acquisition base class. The invention solves the technical problem of poor program reusability caused by the fact that calling methods of a plurality of cameras at the front end of a visual detection system are different and the calling methods need to be written for cameras of each brand respectively in the prior art.

Description

Image acquisition method and device, storage medium and processor
Technical Field
The invention relates to the field of computers, in particular to an image acquisition method and device, a storage medium and a processor.
Background
In order to acquire image information more comprehensively, the intelligent visual detection system usually can set a plurality of image acquisition devices at the front end, and because the brands of the image acquisition devices are possibly different, the intelligent visual detection system is required to be compatible with the image acquisition devices of various different brands, so that the image acquisition devices of various brands can be called to acquire pictures, and then the acquired pictures are transmitted to the next module in the visual detection system for visual processing.
Because the methods for developing and calling the photographed pictures of each brand of image acquisition device are different, in order to enable the visual detection system to call all image acquisition devices with different front-end brands, the currently used method is to rewrite and call related methods for photographing image acquisition devices according to specific image acquisition device brands, so that the reusability is poor, and the development progress is influenced.
Aiming at the problem that in the prior art, due to different calling methods of a plurality of cameras at the front end of a visual detection system, the calling method needs to be written for each brand of camera respectively, so that the reusability of a program is poor, an effective solution is not provided at present.
Disclosure of Invention
The embodiment of the invention provides an image acquisition method and device, a storage medium and a processor, which at least solve the technical problem of poor program reusability caused by the fact that calling methods need to be written for cameras of each brand respectively due to different calling methods of a plurality of cameras at the front end of a visual detection system in the prior art.
According to an aspect of an embodiment of the present invention, there is provided an image capturing method including: receiving a selection instruction, wherein the selection instruction is used for selecting a first image acquisition device from candidate image acquisition devices, and the candidate image acquisition devices are communicated with an upper computer; according to the address information of the first image acquisition device, an image acquisition device object corresponding to the first image acquisition device is established in the factory class; and calling image acquisition subclasses corresponding to the types of the first image acquisition devices through the image acquisition device objects so as to call the first image acquisition devices to acquire images, wherein each type of image acquisition device is provided with one corresponding image acquisition subclass, and the image acquisition subclasses corresponding to the multiple types of image acquisition devices inherit the same image acquisition base class.
Further, after the image capturing subclass corresponding to the type of the first image capturing device is called by the image capturing device object to call the first image capturing device for image capturing, the method further includes: receiving a parameter setting instruction; and setting the parameters of the image acquisition device of the first image acquisition device according to the parameter setting instruction.
Further, the method further comprises: generating an image acquisition base class, wherein the image acquisition base class comprises a virtual function, and the virtual function is used for defining a method to be defined by an image acquisition subclass; generating an image acquisition subclass corresponding to each type of image acquisition device, wherein the image acquisition subclass inherits the image acquisition base class; a factory class is generated, wherein the factory class is used to instantiate the image capture device object.
Further, the imaginary function includes at least one of: writing in parameters of the image acquisition device, reading parameters of the image acquisition device, initializing parameters of the image acquisition device, photographing parameters of the image acquisition device and releasing parameters of the image acquisition device.
Further, the method further comprises: detecting a newly added second image acquisition device which is communicated with the upper computer, wherein the second image acquisition device is different from other image acquisition devices which are communicated with the upper computer in type; and adding an image acquisition subclass corresponding to the second image acquisition device in the image acquisition base class.
According to an aspect of an embodiment of the present invention, there is provided an image pickup apparatus including: the receiving module is used for receiving a selection instruction, wherein the selection instruction is used for selecting a first image acquisition device from candidate image acquisition devices, and the candidate image acquisition devices are communicated with the upper computer; the creating module is used for creating an image acquisition device object corresponding to the first image acquisition device in the factory class according to the address information of the first image acquisition device; and the calling module is used for calling the image acquisition subclasses corresponding to the types of the first image acquisition devices through the image acquisition device objects so as to call the first image acquisition devices to acquire images, wherein each type of image acquisition device is provided with one corresponding image acquisition subclass, and the image acquisition subclasses corresponding to the multiple types of image acquisition devices inherit the same image acquisition base class.
Further, the above apparatus further comprises: the receiving module is used for receiving a parameter setting instruction after calling an image acquisition subclass corresponding to the type of the first image acquisition device through an image acquisition device object so as to call the first image acquisition device to acquire an image; and the setting module is used for setting the parameters of the image acquisition device of the first image acquisition device according to the parameter setting instruction.
Further, the above apparatus further comprises: the image acquisition system comprises a first generation module, a second generation module and a third generation module, wherein the first generation module is used for generating an image acquisition base class, the image acquisition base class comprises a virtual function, and the virtual function is used for defining a method which needs to be defined by an image acquisition subclass; the second generation module is used for generating an image acquisition subclass corresponding to each type of image acquisition device, wherein the image acquisition subclass inherits the image acquisition base class; and the third generation module is used for generating a factory class, wherein the factory class is used for instantiating the image acquisition device object.
According to an aspect of the embodiments of the present invention, there is provided a storage medium including a stored program, wherein when the program is executed, a device on which the storage medium is located is controlled to execute the above-mentioned image capturing method.
According to an aspect of the embodiments of the present invention, there is provided a processor for executing a program, wherein the program executes the image capturing method described above.
In the embodiment of the invention, a selection instruction is received, wherein the selection instruction is used for selecting a first image acquisition device from candidate image acquisition devices, and the candidate image acquisition devices are communicated with an upper computer; according to the address information of the first image acquisition device, an image acquisition device object corresponding to the first image acquisition device is established in the factory class; and calling image acquisition subclasses corresponding to the types of the first image acquisition devices through the image acquisition device objects so as to call the first image acquisition devices to acquire images, wherein each type of image acquisition device is provided with one corresponding image acquisition subclass, and the image acquisition subclasses corresponding to the multiple types of image acquisition devices inherit the same image acquisition base class. The method for calling the camera to take the picture is not limited to a single type of camera, the simple factory mode is adopted, so that the method for taking the picture of multiple types of cameras and other related methods can be inherited to the image acquisition class, and related camera objects can be instantiated in the factory class only by acquiring related information of the selected camera, so that the camera can be called, the expandability is strong, the maintenance is easy, and the technical problem that in the prior art, due to the fact that the calling methods of multiple cameras at the front end of a visual detection system are different, the calling methods need to be written for cameras of each brand respectively, and the reusability of a program is poor is solved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the invention and together with the description serve to explain the invention without limiting the invention. In the drawings:
FIG. 1 is a flow chart of an image acquisition method according to an embodiment of the invention;
FIG. 2 is a schematic diagram of a human-machine interface according to an embodiment of the invention;
FIG. 3 is a flow chart of a method of image acquisition according to an embodiment of the present invention;
FIG. 4 is a diagram illustrating a method for compiling a call for an image capture device according to an embodiment of the present invention;
fig. 5 is a schematic diagram of an image acquisition apparatus according to an embodiment of the present invention.
Detailed Description
In order to make the technical solutions of the present invention better understood, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, 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 invention.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are capable of operation in sequences other than those illustrated or 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.
Example 1
In accordance with an embodiment of the present invention, there is provided an embodiment of an image acquisition method, it is noted that the steps illustrated in the flowchart of the drawings may be performed in a computer system such as a set of computer-executable instructions and that, although a logical order is illustrated in the flowchart, in some cases, the steps illustrated or described may be performed in an order different than here.
Fig. 1 is a flow chart of an image acquisition method according to an embodiment of the present invention, as shown in fig. 1, the method including the steps of:
and S102, receiving a selection instruction, wherein the selection instruction is used for selecting a first image acquisition device from candidate image acquisition devices, and the candidate image acquisition devices are communicated with an upper computer.
The scheme of the embodiment can be used for a visual detection system, the visual detection system can be a system for industrially detecting the image of a product through a plurality of cameras arranged at the front end, and the visual detection system can be applied to material size measurement, appearance defect detection of the product and the like. And after the visual detection system acquires the image collected by the front-end camera, the image is sent to the next image processing module to execute a specific detection task.
The visual detection system can comprise a camera used for collecting images at the front end and an upper computer used for man-machine interaction, wherein the camera at the front end is communicated with the upper computer so as to receive control of the upper computer and transmit collected images back to the upper computer. The candidate image capturing device may be a camera that communicates with the upper computer and allows control by the upper computer.
Specifically, the selection instruction can be generated on a human-computer interaction interface displayed on the upper computer. The human-computer interaction may include identification information, physical address information, and/or brand information of the candidate image capture devices. The user can select one or more devices needing image acquisition on the man-machine interaction interface.
Fig. 2 is a schematic diagram of a human-computer interaction interface according to an embodiment of the present invention, which is shown in fig. 2, and the interface has a camera list, and a user can select a camera to be used from the camera list. The camera selected by the user is the first image acquisition device.
And step S104, creating an image acquisition device object corresponding to the first image acquisition device in the factory class according to the address information of the first image acquisition device. The address information may be physical address information of the selected first image capturing device.
And step S106, calling image acquisition subclasses corresponding to the types of the first image acquisition devices through the image acquisition device objects so as to call the first image acquisition devices to acquire images, wherein each type of image acquisition device is provided with one corresponding image acquisition subclass, and the image acquisition subclasses corresponding to the multiple types of image acquisition devices inherit the same image acquisition base class.
Specifically, the image capturing subclass is used to define a method for invoking the image capturing device.
In the above scheme, a common image acquisition subclass is created for image acquisition devices of the same calling mode. In particular, the type may be used to indicate the brand of the image capturing device. Cameras of different brands generally have the same calling method, so that the same image acquisition subclass can be shared, but when the calling methods of the cameras of the same brand and different models are different, the corresponding image acquisition subclasses need to be created respectively.
In an alternative embodiment, a corresponding image capture subclass may be created for each brand of camera, after a selected camera is determined, a corresponding camera object is created in a factory class according to physical address information of the selected camera, and the image capture subclass corresponding to the brand to which the camera belongs is called according to the camera object, so that the camera is started to take a picture.
By the method for calling the camera to shoot, a visual detection system can prompt an image acquisition method compatible with cameras of various brands, necessary camera brand judgment is realized in factories, an object of which specific brand of camera is specifically created is analyzed according to name information of camera equipment selected by an image acquisition module editing interface, the specific implementation mode of an image acquisition module is not required to be known by the outside completely through the factories, the required object can be created only by selecting the camera, responsibility and right among modules are determined, and optimization of the whole software architecture is facilitated.
It should be noted that this method is very convenient for adding a new type of image acquisition device, and the newly added image acquisition device only needs to add methods such as inheriting an image acquisition parent class, rewriting read-write parameters, initializing a camera, taking a picture, and adding a creation object code of the newly added type of image acquisition device in a factory class. The maintenance of the existing image acquisition devices is also facilitated, and when an abnormality occurs in the photographing process of a certain type of image acquisition device or a new function is added to the type of image acquisition device, only the method in the image acquisition subclass of the type of image acquisition device needs to be modified and adjusted.
Therefore, the embodiment of the application receives a selection instruction, wherein the selection instruction is used for selecting the first image acquisition device from the candidate image acquisition devices, and the candidate image acquisition devices are communicated with the upper computer; according to the address information of the first image acquisition device, an image acquisition device object corresponding to the first image acquisition device is established in the factory class; and calling image acquisition subclasses corresponding to the types of the first image acquisition devices through the image acquisition device objects so as to call the first image acquisition devices to acquire images, wherein each type of image acquisition device is provided with one corresponding image acquisition subclass, and the image acquisition subclasses corresponding to the multiple types of image acquisition devices inherit the same image acquisition base class. The method for calling the camera to take the picture is not limited to a single type of camera, the simple factory mode is adopted, so that the method for taking the picture of multiple types of cameras and other related methods can be inherited to the image acquisition class, and related camera objects can be instantiated in the factory class only by acquiring related information of the selected camera, so that the camera can be called, the expandability is strong, the maintenance is easy, and the technical problem that in the prior art, due to the fact that the calling methods of multiple cameras at the front end of a visual detection system are different, the calling methods need to be written for cameras of each brand respectively, and the reusability of a program is poor is solved.
As an alternative embodiment, after the invoking of the image capturing subclass corresponding to the type of the first image capturing device by the image capturing device object to invoke the first image capturing device to capture an image, the method further includes: receiving a parameter setting instruction; and setting the parameters of the image acquisition device of the first image acquisition device according to the parameter setting instruction.
In the above solution, according to the physical address information specific to the camera, a corresponding unique camera object is created from a corresponding brand camera image capture class, so that the setting of camera parameters can be implemented, for example: the camera has the advantages of exposure value, gain value, Gamma value, black-white/color mode selection and software/hardware mode selection, and can select single-sheet shooting or real-time acquisition for effect viewing on an editing interface.
Still referring to fig. 2, after a camera is selected and a unique camera object is created for the selected camera in the factory class, camera parameters of the camera, including an exposure value, a gain value, a Gamma value, a black-and-white/color mode selection, a software/hardware mode selection, and the like, are returned to the human-computer interface at the front end, a user may modify the camera parameters on the human-computer interface, and the human-computer interface modifies the camera parameters of the first camera according to the parameter modification instruction after receiving the parameter modification instruction.
Fig. 3 is a flowchart of an alternative image capturing method according to an embodiment of the present invention, which is shown in fig. 3, and first selects a camera to be called in an editing interface; then creating camera objects of corresponding brands in the factory class; setting parameters such as camera exposure and gain values in the created camera object; when the visual inspection system software is operated, calling a camera to shoot according to the stored camera object; and finally, transmitting the shot picture to the next visual detection tool.
As an alternative embodiment, the method further includes: generating an image acquisition base class, wherein the image acquisition base class comprises a virtual function, and the virtual function is used for defining a method to be defined by an image acquisition subclass; generating an image acquisition subclass corresponding to each type of image acquisition device, wherein the image acquisition subclass inherits the image acquisition base class; a factory class is generated, wherein the factory class is used to instantiate the image capture device object.
Fig. 4 is a schematic diagram of a method for compiling a call of an image capturing apparatus according to an embodiment of the present invention, and in an alternative embodiment, an image capturing base class may be first compiled, and this base class is responsible for describing an interface method common to all instances, and contains a virtual function: write camera parameter setparameter (), read camera parameter getparameter (), initialize connected camera connet (), camera photographing pyramid (), release camera close (), and the like. Then, the image acquisition methods of various brands of cameras are written into subclasses of image acquisition classes, wherein the subclasses are the creation targets of simple factory models. And inheriting the parent class, rewriting and writing camera parameters, reading the camera parameters, initializing and connecting the camera, photographing the camera, releasing the camera and the like. And finally, compiling a core class, namely a factory class, of the whole image acquisition module, wherein the class is mainly responsible for realizing the internal logic of creating all instances, reading the names of all equipment connected with the cameras when an editing interface of the image acquisition module is opened, wherein the equipment names contain camera brand information, and when a client selects the cameras, the factory class creates objects of corresponding brands by selecting camera brand names, so that the image acquisition classes of the cameras of the corresponding brands are called.
As an alternative embodiment, the virtual function comprises at least one of: writing in parameters of the image acquisition device, reading parameters of the image acquisition device, initializing parameters of the image acquisition device, photographing parameters of the image acquisition device and releasing parameters of the image acquisition device.
As an alternative embodiment, the method further includes: detecting a newly added second image acquisition device which is communicated with the upper computer, wherein the second image acquisition device is different from other image acquisition devices which are communicated with the upper computer in type; and adding an image acquisition subclass corresponding to the second image acquisition device in the image acquisition base class.
According to the scheme, under the condition that a new type of image acquisition device is added, a corresponding image acquisition subclass is compiled for the newly added image acquisition device, and the image acquisition subclass inherits a previous image acquisition base class, so that the newly added image acquisition device can be called.
The method facilitates the addition of a new type of image acquisition device, and the newly added image acquisition device only needs to add methods of inheriting an image acquisition parent class, rewriting read-write parameters, initializing a camera, photographing and the like, and add a creation object code of the newly added type of image acquisition device in a factory class. The maintenance of the existing image acquisition devices is also facilitated, and when an abnormality occurs in the photographing process of a certain type of image acquisition device or a new function is added to the type of image acquisition device, only the method in the image acquisition subclass of the type of image acquisition device needs to be modified and adjusted.
In summary, most image acquisition modules of the visual inspection system software are mainly used for customizing cameras of related brands, and after the cameras are selected, methods of reading and writing camera parameters, photographing pictures and the like need to judge the camera types, so that the method is complex and chaotic, development codes of different cameras are inconvenient to add and maintain, and the development cycle is seriously influenced. The method is applicable to various required selections. Compared with the traditional method for customizing and developing image acquisition, the scheme provided by the application has the following advantages: the scheme adopts a simple factory mode, firstly a father class for image acquisition is compiled, virtual function camera initialization, camera photographing, camera releasing and other methods are arranged in the father class, then the image acquisition of various brands of cameras is written into subclasses of the image acquisition class, and after the father class is inherited, the methods of camera initialization, camera photographing, camera releasing and the like are rewritten. Finally, a factory class is written to instantiate the objects of the corresponding brand of camera. Therefore, the new brand camera is added only by adding the subclass of the camera and adding the object for instantiating the brand camera in the factory class, so that the expansion and maintenance of various brand cameras are facilitated, and the development and maintenance time is shortened.
Example 2
According to an embodiment of the present invention, an embodiment of an image capturing apparatus is provided, and fig. 5 is a schematic diagram of an image capturing apparatus according to an embodiment of the present invention, as shown in fig. 5, the apparatus includes the following:
a receiving module 52, configured to receive a selection instruction, where the selection instruction is used to select a first image capturing device from candidate image capturing devices, and the candidate image capturing devices are in communication with an upper computer;
a creating module 54, configured to create, in the factory class, an image capturing device object corresponding to the first image capturing device according to the address information of the first image capturing device;
and the calling module 56 is configured to call, through the image acquisition device object, the image acquisition subclass corresponding to the type of the first image acquisition device, so as to call the first image acquisition device to perform image acquisition, where each type of image acquisition device has one corresponding image acquisition subclass, and the image acquisition subclasses corresponding to the multiple types of image acquisition devices inherit the same image acquisition base class.
As an alternative embodiment, the apparatus further comprises: the receiving module is used for receiving a parameter setting instruction after calling an image acquisition subclass corresponding to the type of the first image acquisition device through an image acquisition device object so as to call the first image acquisition device to acquire an image; and the setting module is used for setting the parameters of the image acquisition device of the first image acquisition device according to the parameter setting instruction.
As an alternative embodiment, the apparatus further comprises: the image acquisition system comprises a first generation module, a second generation module and a third generation module, wherein the first generation module is used for generating an image acquisition base class, the image acquisition base class comprises a virtual function, and the virtual function is used for defining a method which needs to be defined by an image acquisition subclass; the second generation module is used for generating an image acquisition subclass corresponding to each type of image acquisition device, wherein the image acquisition subclass inherits the image acquisition base class; and the third generation module is used for generating a factory class, wherein the factory class is used for instantiating the image acquisition device object.
As an alternative embodiment, the virtual function comprises at least one of: writing in parameters of the image acquisition device, reading parameters of the image acquisition device, initializing parameters of the image acquisition device, photographing parameters of the image acquisition device and releasing parameters of the image acquisition device.
As an alternative embodiment, the apparatus further comprises: the detection module is used for detecting a newly added second image acquisition device which is communicated with the upper computer, wherein the second image acquisition device is different from other image acquisition devices which are communicated with the upper computer in type; and the adding module is used for adding an image acquisition subclass corresponding to the second image acquisition device in the image acquisition base class.
Example 3
According to an embodiment of the present invention, a storage medium is provided, where the storage medium includes a stored program, and when the program runs, a device in which the storage medium is located is controlled to execute the image capturing method according to embodiment 1.
Example 4
According to an embodiment of the present invention, there is provided a processor configured to execute a program, where the program executes the image capturing method according to embodiment 1 during execution.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
In the above embodiments of the present invention, 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 technology can be implemented in other ways. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units may be a logical division, and in actual implementation, there may be another division, for example, multiple 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 through some interfaces, units or modules, and may be in an electrical 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 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 invention 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, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes 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 method according to the embodiments of the present invention. And the aforementioned storage medium includes: 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.
The foregoing is only a preferred embodiment of the present invention, and it should be noted that, for those skilled in the art, various modifications and decorations can be made without departing from the principle of the present invention, and these modifications and decorations should also be regarded as the protection scope of the present invention.

Claims (10)

1. An image acquisition method, comprising:
receiving a selection instruction, wherein the selection instruction is used for selecting a first image acquisition device from candidate image acquisition devices, and the candidate image acquisition devices are communicated with an upper computer;
according to the address information of the first image acquisition device, an image acquisition device object corresponding to the first image acquisition device is created in a factory class;
and calling image acquisition subclasses corresponding to the types of the first image acquisition devices through the image acquisition device object so as to call the first image acquisition devices to acquire images, wherein each type of image acquisition device is provided with one corresponding image acquisition subclass, and the image acquisition subclasses corresponding to the multiple types of image acquisition devices inherit the same image acquisition base class.
2. The method of claim 1, wherein after invoking, by the image capture device object, an image capture subclass corresponding to a type of the first image capture device to invoke image capture by the first image capture device, the method further comprises:
receiving a parameter setting instruction;
and setting the parameters of the image acquisition device of the first image acquisition device according to the parameter setting instruction.
3. The method of claim 1, further comprising:
generating the image acquisition base class, wherein the image acquisition base class comprises a virtual function, and the virtual function is used for defining a method to be defined by an image acquisition subclass;
generating an image acquisition subclass corresponding to each type of image acquisition device, wherein the image acquisition subclass inherits the image acquisition base class;
generating a plant class, wherein the plant class is to instantiate the image capture device object.
4. The method of claim 3, wherein the imaginary function comprises at least one of: writing in parameters of the image acquisition device, reading parameters of the image acquisition device, initializing parameters of the image acquisition device, photographing parameters of the image acquisition device and releasing parameters of the image acquisition device.
5. The method of claim 3, further comprising:
detecting a newly added second image acquisition device which is communicated with the upper computer, wherein the second image acquisition device and other image acquisition devices which are communicated with the upper computer are different in type;
and adding an image acquisition subclass corresponding to the second image acquisition device in the image acquisition base class.
6. An image acquisition apparatus, comprising:
the device comprises a receiving module, a selecting module and a judging module, wherein the receiving module is used for receiving a selecting instruction, the selecting instruction is used for selecting a first image acquisition device from candidate image acquisition devices, and the candidate image acquisition devices are communicated with an upper computer;
the creating module is used for creating an image acquisition device object corresponding to the first image acquisition device in a factory class according to the address information of the first image acquisition device;
and the calling module is used for calling the image acquisition subclasses corresponding to the types of the first image acquisition devices through the image acquisition device object so as to call the first image acquisition devices to acquire images, wherein each type of image acquisition device is provided with one corresponding image acquisition subclass, and the image acquisition subclasses corresponding to the multiple types of image acquisition devices inherit the same image acquisition base class.
7. The apparatus of claim 6, further comprising:
the receiving module is used for receiving a parameter setting instruction after calling the image acquisition subclass corresponding to the type of the first image acquisition device through the image acquisition device object so as to call the first image acquisition device to acquire an image;
and the setting module is used for setting the parameters of the image acquisition device of the first image acquisition device according to the parameter setting instruction.
8. The apparatus of claim 6, further comprising:
the image acquisition system comprises a first generation module, a second generation module and a third generation module, wherein the first generation module is used for generating an image acquisition base class, the image acquisition base class comprises a virtual function, and the virtual function is used for defining a method which needs to be defined by an image acquisition subclass;
the second generation module is used for generating an image acquisition subclass corresponding to each type of image acquisition device, wherein the image acquisition subclass inherits the image acquisition base class;
a third generation module to generate a factory class, wherein the factory class is to instantiate the image capture device object.
9. A storage medium, characterized in that the storage medium comprises a stored program, wherein the program, when executed, controls an apparatus in which the storage medium is located to perform the image capturing method according to any one of claims 1 to 5.
10. A processor, characterized in that the processor is configured to run a program, wherein the program is configured to perform the image acquisition method of any one of claims 1 to 5 when running.
CN202011468776.8A 2020-12-14 2020-12-14 Image acquisition method and device, storage medium and processor Pending CN112653836A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011468776.8A CN112653836A (en) 2020-12-14 2020-12-14 Image acquisition method and device, storage medium and processor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011468776.8A CN112653836A (en) 2020-12-14 2020-12-14 Image acquisition method and device, storage medium and processor

Publications (1)

Publication Number Publication Date
CN112653836A true CN112653836A (en) 2021-04-13

Family

ID=75354099

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011468776.8A Pending CN112653836A (en) 2020-12-14 2020-12-14 Image acquisition method and device, storage medium and processor

Country Status (1)

Country Link
CN (1) CN112653836A (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103795814A (en) * 2014-02-13 2014-05-14 浪潮软件股份有限公司 Short message equipment universal communication interface based on fully domestic CPU and OS
CN104182220A (en) * 2014-08-12 2014-12-03 浪潮软件股份有限公司 Image acquisition method based on domestic CPU and domestic OS
CN105867943A (en) * 2016-04-19 2016-08-17 天津天大求实电力新技术股份有限公司 Channel management realization method for microgrid data acquisition system
CN108446149A (en) * 2018-02-28 2018-08-24 北京凌宇智控科技有限公司 A kind of third party's dynamic bank interface hold-up interception method and system
CN110083357A (en) * 2019-04-28 2019-08-02 博众精工科技股份有限公司 Interface construction method, device, server and storage medium
CN110134378A (en) * 2018-02-08 2019-08-16 腾讯科技(深圳)有限公司 Application program creation method and device, computer equipment and storage medium
CN110958411A (en) * 2020-02-23 2020-04-03 武汉精立电子技术有限公司 Image acquisition control method and device based on FPGA
US20200356350A1 (en) * 2019-05-10 2020-11-12 Fasility Llc Methods and Systems for Visual Programming using Polymorphic, Dynamic Multi-Dimensional Structures

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103795814A (en) * 2014-02-13 2014-05-14 浪潮软件股份有限公司 Short message equipment universal communication interface based on fully domestic CPU and OS
CN104182220A (en) * 2014-08-12 2014-12-03 浪潮软件股份有限公司 Image acquisition method based on domestic CPU and domestic OS
CN105867943A (en) * 2016-04-19 2016-08-17 天津天大求实电力新技术股份有限公司 Channel management realization method for microgrid data acquisition system
CN110134378A (en) * 2018-02-08 2019-08-16 腾讯科技(深圳)有限公司 Application program creation method and device, computer equipment and storage medium
CN108446149A (en) * 2018-02-28 2018-08-24 北京凌宇智控科技有限公司 A kind of third party's dynamic bank interface hold-up interception method and system
CN110083357A (en) * 2019-04-28 2019-08-02 博众精工科技股份有限公司 Interface construction method, device, server and storage medium
US20200356350A1 (en) * 2019-05-10 2020-11-12 Fasility Llc Methods and Systems for Visual Programming using Polymorphic, Dynamic Multi-Dimensional Structures
CN110958411A (en) * 2020-02-23 2020-04-03 武汉精立电子技术有限公司 Image acquisition control method and device based on FPGA

Similar Documents

Publication Publication Date Title
WO2017167032A1 (en) Target object displaying method and device
CN101283328B (en) Extensible visual effects on active content in user interfaces
CN109891466A (en) The enhancing of 3D model scans
US11132770B2 (en) Image processing methods and apparatuses, computer readable storage media and electronic devices
US7877749B2 (en) Utilizing and maintaining data definitions during process thread traversals
CN109101298B (en) Windows cross-process window management method, storage medium, electronic device and system
CN106951298A (en) A kind of method and apparatus for lifting application toggle speed
CN111338669B (en) Method and device for updating intelligent function in intelligent analysis box
CN105701854B (en) A kind of 3D rendering intents, device and engine
CN112653836A (en) Image acquisition method and device, storage medium and processor
CN113178017A (en) AR data display method and device, electronic equipment and storage medium
CN109324967A (en) The method, apparatus and terminal device of application program pop-up components testing
Baracchi et al. Camera obscura: Exploiting in-camera processing for image counter forensics
CN113485686B (en) Information system program generation method and device, electronic equipment and storage medium
US7155719B2 (en) Continuation manager
CN118076975A (en) Data processing method, data processing system, electronic device and storage medium
US6910103B2 (en) Caching data
Kornyakov Instant OpenCV for iOS
CN114578972B (en) Trigger method and system for compatible plane and curved surface UI (user interface) event in VR (virtual reality) scene
CN108959075B (en) Method and device for testing algorithm library, storage medium and electronic equipment
HORTAI et al. Zpracování obrazu v systému Android-detekce a rozpoznání SPZ/RZ
CN117315127A (en) Automatic building block construction flow chart generation method and system based on parts and components
CN116360778A (en) AI simulation teaching method and system based on imaging programming platform
CN116310100A (en) Method and tool for focusing three-dimensional model based on Unreal Engine
CN116796500A (en) Automatic modeling method and system for digital twin scene

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20210413