CN115205436A - Self-adaptive constellation mapping method, equipment and computer readable storage medium - Google Patents

Self-adaptive constellation mapping method, equipment and computer readable storage medium Download PDF

Info

Publication number
CN115205436A
CN115205436A CN202210736698.8A CN202210736698A CN115205436A CN 115205436 A CN115205436 A CN 115205436A CN 202210736698 A CN202210736698 A CN 202210736698A CN 115205436 A CN115205436 A CN 115205436A
Authority
CN
China
Prior art keywords
constellation
sky
stars
information
shooting
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
CN202210736698.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.)
Nubia Technology Co Ltd
Original Assignee
Nubia 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 Nubia Technology Co Ltd filed Critical Nubia Technology Co Ltd
Priority to CN202210736698.8A priority Critical patent/CN115205436A/en
Publication of CN115205436A publication Critical patent/CN115205436A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T15/003D [Three Dimensional] image rendering
    • G06T15/04Texture mapping
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T19/00Manipulating 3D models or images for computer graphics
    • G06T19/20Editing of 3D images, e.g. changing shapes or colours, aligning objects or positioning parts
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/11Region-based segmentation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2219/00Indexing scheme for manipulating 3D models or images for computer graphics
    • G06T2219/20Indexing scheme for editing of 3D models
    • G06T2219/2016Rotation, translation, scaling

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Graphics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Architecture (AREA)
  • Computer Hardware Design (AREA)
  • General Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Studio Devices (AREA)

Abstract

The invention discloses a self-adaptive constellation mapping method, equipment and a computer readable storage medium, wherein the method comprises the following steps: calculating to obtain a first constellation range of the current equipment in an ideal shooting state according to sensor information, time information and position information of the current equipment, star catalogue information corresponding to the position information and field angle information of a camera of the current equipment; acquiring a shooting preview image of the camera, and acquiring a sky area in the shooting preview image through a preset sky segmentation algorithm; determining, in each constellation in the first constellation range, stars in the sky region, and determining a number of the stars and a location of the stars in the sky region, within the sky region; and determining a target constellation according to the number and the position, and fusing the image of the target constellation to the shooting preview image. The invention greatly enhances the adaptability and stability of starry sky shooting.

Description

Self-adaptive constellation mapping method, equipment and computer readable storage medium
Technical Field
The present invention relates to the field of mobile communications, and in particular, to a method and apparatus for adaptive constellation mapping, and a computer-readable storage medium.
Background
In the prior art, along with the continuous development of intelligent terminal equipment, the shooting demand of a user on the equipment is higher and higher. In particular, starry sky shooting becomes a feature shooting function of mobile devices such as mobile phones. At present, the starry sky shooting is mostly used for image enhancement of existing stars, such as moon, so that imaging of the stars is more obvious. However, in a high-brightness night sky such as a city, stars and other stars may not be obtained at all, so that image enhancement processing cannot be performed, and the star shooting function cannot be normally applied, so that the starry shooting experience of a user has great defects in functional integrity, stability and adaptability.
Disclosure of Invention
In order to solve the technical defects in the prior art, the invention provides a self-adaptive constellation mapping method, which comprises the following steps:
and calculating to obtain a first constellation range of the current equipment in an ideal shooting state according to the sensor information, the time information and the position information of the current equipment, the star table information corresponding to the position information and the field angle information of a camera of the current equipment.
Acquiring a shooting preview image of the camera, and acquiring a sky area in the shooting preview image through a preset sky segmentation algorithm.
Determining stars in each constellation in the first constellation range that fall within the sky region, and determining the number of stars and the location of the sky region.
And determining a target constellation according to the number and the position, and fusing the image of the target constellation to the shooting preview image.
Optionally, the calculating, according to the sensor information, the time information, and the position information of the current device, the star table information corresponding to the position information, and the field angle information of the camera of the current device, to obtain the first constellation range of the current device in the ideal shooting state includes:
and determining longitude and latitude information of the stars of each constellation on a preset celestial sphere according to the star table information.
And creating a celestial sphere model of the celestial sphere according to a preset graphic processing interface and the longitude and latitude information, and controlling the celestial sphere model to rotate according to the time difference between the time information and the star catalogue information.
Optionally, the calculating, according to the sensor information, the time information, and the position information of the current device, the star table information corresponding to the position information, and the field angle information of the camera of the current device, to obtain the first constellation range of the current device in the ideal shooting state further includes:
and determining the shooting position and the shooting orientation of the camera according to the sensor information, the position information and the field angle information by taking the sphere center of the celestial sphere model as an observation point.
And obtaining a model view projection matrix of the celestial sphere model in a rotating state by calling a preset function of the graphic processing interface.
Optionally, the calculating, according to the sensor information, the time information, and the position information of the current device, the star table information corresponding to the position information, and the field angle information of the camera of the current device, to obtain the first constellation range of the current device in the ideal shooting state further includes:
and carrying out matrix transformation on the coordinates of all stars on the celestial sphere model according to the model view projection matrix to obtain the projection positions of all stars projected onto a preset view plane.
And reserving stars within a preset range and a constellation to which the stars belong on the view plane, and taking the constellation as the first constellation range.
Optionally, the acquiring a shooting preview image of the camera and acquiring a sky region in the shooting preview image through a preset sky segmentation algorithm includes:
training a sky mask image through a preset depth model and sky image data to obtain the sky segmentation model.
Inputting the shooting preview image into the sky segmentation model, and performing sky segmentation on the shooting preview image through a sky segmentation algorithm of the sky segmentation model to obtain the sky region.
Optionally, the determining, within the sky region, stars in each constellation within the first constellation range that fall within the sky region, and determining the number of stars and the location of the stars in the sky region, comprises:
and acquiring the number of stars in each constellation within the range of the first constellation.
And if the constellation with the maximum number of the stars is unique, taking the constellation with the maximum number of the stars as the target constellation.
Optionally, the determining, within the range of the sky region, stars in each constellation within the first constellation range that fall within the sky region, and determining the number of stars and the location of the stars in the sky region further comprises:
and if the constellation with the largest number of the stars is more than one, classifying the plurality of constellations with the largest number of the stars into a second constellation range.
And in the second constellation range, acquiring a distance value between a constellation geometric center of each constellation and a region geometric center of the sky region, and taking the constellation with the minimum distance value as the target constellation.
Optionally, the determining a target constellation according to the number and the position, and fusing an image of the target constellation to the shooting preview image includes:
and setting the star image parameters of the target constellation according to the image parameters of the shot preview image.
And fusing the image of the target constellation to the shooting preview image according to the star image parameters.
The invention also proposes an adaptive constellation mapping device comprising a memory, a processor and a computer program stored on said memory and executable on said processor, said computer program, when executed by said processor, implementing the steps of the adaptive constellation mapping method as defined in any one of the above.
The present invention further proposes a computer readable storage medium having stored thereon an adaptive constellation mapping program, which when executed by a processor implements the steps of the adaptive constellation mapping method as described in any of the above.
By implementing the self-adaptive constellation mapping method, the self-adaptive constellation mapping equipment and the computer readable storage medium, a first constellation range of the current equipment in an ideal shooting state is obtained through calculation according to sensor information, time information and position information of the current equipment, star catalogue information corresponding to the position information and field angle information of a camera of the current equipment; acquiring a shooting preview image of the camera, and acquiring a sky area in the shooting preview image through a preset sky segmentation algorithm; determining, within the sky region, stars in each constellation within the first constellation range that fall within the sky region, and determining a number of the stars and a location of the stars in the sky region; and determining a target constellation according to the number and the position, and fusing the image of the target constellation to the shooting preview image. A humanized constellation mapping processing scheme is realized, starry sky shooting is not limited by a light environment any more, and adaptability and stability of starry sky shooting are greatly enhanced.
Drawings
The invention will be further described with reference to the accompanying drawings and examples, in which:
fig. 1 is a schematic diagram of a hardware structure of a mobile terminal according to the present invention;
fig. 2 is a diagram of a communication network architecture according to an embodiment of the present invention;
FIG. 3 is a flow chart of a first embodiment of an adaptive constellation mapping method of the present invention;
FIG. 4 is a flow chart of a second embodiment of the adaptive constellation mapping method of the present invention;
FIG. 5 is a flow chart of a third embodiment of an adaptive constellation mapping method of the present invention;
fig. 6 is a flow chart of a fourth embodiment of the adaptive constellation mapping method of the present invention;
fig. 7 is a flow chart of a fifth embodiment of the adaptive constellation mapping method of the present invention;
fig. 8 is a flowchart of a sixth embodiment of an adaptive constellation mapping method of the present invention;
fig. 9 is a flowchart of a seventh embodiment of an adaptive constellation mapping method of the present invention;
fig. 10 is a flowchart of an eighth embodiment of an adaptive constellation mapping method of the present invention;
fig. 11 is a schematic diagram of a constellation in a theoretical shooting state according to a sixth embodiment of the adaptive constellation mapping method of the present invention;
FIG. 12 is a schematic diagram of a preview shooting process according to a sixth embodiment of the adaptive constellation mapping method of the present invention;
FIG. 13 is a sky mask diagram according to a sixth embodiment of the adaptive constellation mapping method of the present invention;
fig. 14 is a schematic diagram of constellation selection in a sixth embodiment of the adaptive constellation mapping method of the present invention;
fig. 15 is a schematic diagram of image fusion in the eighth embodiment of the adaptive constellation mapping method according to the present invention.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
In the following description, suffixes such as "module", "component", or "unit" used to denote elements are used only for facilitating the explanation of the present invention, and have no specific meaning in itself. Thus, "module", "component" or "unit" may be used mixedly.
The terminal may be implemented in various forms. For example, the terminal described in the present invention may include a mobile terminal such as a mobile phone, a tablet computer, a notebook computer, a palmtop computer, a Personal Digital Assistant (PDA), a Portable Media Player (PMP), a navigation device, a wearable device, a smart band, a pedometer, and the like, and a fixed terminal such as a Digital TV, a desktop computer, and the like.
The following description will be given by way of example of a mobile terminal, and it will be understood by those skilled in the art that the construction according to the embodiment of the present invention can be applied to a fixed type terminal, in addition to elements particularly used for mobile purposes.
Referring to fig. 1, which is a schematic diagram of a hardware structure of a mobile terminal for implementing various embodiments of the present invention, the mobile terminal 100 may include: an RF (Radio Frequency) unit 101, a WiFi module 102, an audio output unit 103, an a/V (audio/video) input unit 104, a sensor 105, a display unit 106, a user input unit 107, an interface unit 108, a memory 109, a processor 110, and a power supply 111. Those skilled in the art will appreciate that the mobile terminal architecture shown in fig. 1 is not intended to be limiting of mobile terminals, which may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components.
The following describes each component of the mobile terminal in detail with reference to fig. 1:
the radio frequency unit 101 may be configured to receive and transmit signals during information transmission and reception or during a call, and specifically, receive downlink information of a base station and then process the downlink information to the processor 110; in addition, the uplink data is transmitted to the base station. Typically, radio frequency unit 101 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier, a duplexer, and the like. In addition, the radio frequency unit 101 can also communicate with a network and other devices through wireless communication. The wireless communication may use any communication standard or protocol, including but not limited to GSM (Global System for Mobile communications), GPRS (General Packet Radio Service), CDMA2000 (Code Division Multiple Access 2000 ), WCDMA (Wideband Code Division Multiple Access), TD-SCDMA (Time Division-Synchronous Code Division Multiple Access), FDD-LTE (Frequency Division multiplexing-Long Term Evolution), and TDD-LTE (Time Division multiplexing-Long Term Evolution), etc.
WiFi belongs to short-distance wireless transmission technology, and the mobile terminal can help a user to receive and send e-mails, browse webpages, access streaming media and the like through the WiFi module 102, and provides wireless broadband internet access for the user. Although fig. 1 shows the WiFi module 102, it is understood that it does not belong to the essential constitution of the mobile terminal, and can be omitted entirely as needed within the scope not changing the essence of the invention.
The audio output unit 103 may convert audio data received by the radio frequency unit 101 or the WiFi module 102 or stored in the memory 109 into an audio signal and output as sound when the mobile terminal 100 is in a call signal reception mode, a call mode, a recording mode, a voice recognition mode, a broadcast reception mode, or the like. Also, the audio output unit 103 may also provide audio output related to a specific function performed by the mobile terminal 100 (e.g., a call signal reception sound, a message reception sound, etc.). The audio output unit 103 may include a speaker, a buzzer, and the like.
The a/V input unit 104 is used to receive audio or video signals. The a/V input Unit 104 may include a Graphics Processing Unit (GPU) 1041 and a microphone 1042, the Graphics processor 1041 Processing image data of still pictures or video obtained by an image capturing device (e.g., a camera) in a video capturing mode or an image capturing mode. The processed image frames may be displayed on the display unit 106. The image frames processed by the graphic processor 1041 may be stored in the memory 109 (or other storage medium) or transmitted via the radio frequency unit 101 or the WiFi module 102. The microphone 1042 can receive sounds (audio data) via the microphone 1042 in a phone call mode, a recording mode, a voice recognition mode, or the like, and can process such sounds into audio data. The processed audio (voice) data may be converted into a format output transmittable to a mobile communication base station via the radio frequency unit 101 in case of the phone call mode. The microphone 1042 may implement various types of noise cancellation (or suppression) algorithms to cancel (or suppress) noise or interference generated in the course of receiving and transmitting audio signals.
The mobile terminal 100 also includes at least one sensor 105, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor includes an ambient light sensor that can adjust the brightness of the display panel 1061 according to the brightness of ambient light, and a proximity sensor that can turn off the display panel 1061 and/or the backlight when the mobile terminal 100 moves to the ear. As one of the motion sensors, the accelerometer sensor can detect the magnitude of acceleration in each direction (generally, three axes), can detect the magnitude and direction of gravity when stationary, and can be used for applications of recognizing the gesture of the mobile phone (such as horizontal and vertical screen switching, related games, magnetometer gesture calibration), vibration recognition related functions (such as pedometer and tapping), and the like; as for other sensors such as a fingerprint sensor, a pressure sensor, an iris sensor, a molecular sensor, a gyroscope, a barometer, a hygrometer, a thermometer, and an infrared sensor, which can be configured on the mobile phone, further description is omitted here.
The display unit 106 is used to display information input by a user or information provided to the user. The Display unit 106 may include a Display panel 1061, and the Display panel 1061 may be configured in the form of a Liquid Crystal Display (LCD), an Organic Light-Emitting Diode (OLED), or the like.
The user input unit 107 may be used to receive input numeric or character information and generate key signal inputs related to user settings and function control of the mobile terminal. Specifically, the user input unit 107 may include a touch panel 1071 and other input devices 1072. The touch panel 1071, also referred to as a touch screen, can collect touch operations of a user (e.g., operations of a user on the touch panel 1071 or near the touch panel 1071 using a finger, a stylus, or any other suitable object or accessory) thereon or nearby and drive the corresponding connection device according to a predetermined program. The touch panel 1071 may include two parts of a touch detection device and a touch controller. The touch detection device detects the touch direction of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch sensing device, converts the touch information into touch point coordinates, sends the touch point coordinates to the processor 110, and can receive and execute commands sent by the processor 110. In addition, the touch panel 1071 may be implemented in various types, such as a resistive type, a capacitive type, an infrared ray, and a surface acoustic wave. In addition to the touch panel 1071, the user input unit 107 may include other input devices 1072. In particular, other input devices 1072 may include, but are not limited to, one or more of a physical keyboard, function keys (e.g., volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, and the like, and are not limited to these specific examples.
Further, the touch panel 1071 may cover the display panel 1061, and when the touch panel 1071 detects a touch operation thereon or nearby, the touch panel 1071 transmits the touch operation to the processor 110 to determine the type of the touch event, and then the processor 110 provides a corresponding visual output on the display panel 1061 according to the type of the touch event. Although the touch panel 1071 and the display panel 1061 are shown in fig. 1 as two separate components to implement the input and output functions of the mobile terminal, in some embodiments, the touch panel 1071 and the display panel 1061 may be integrated to implement the input and output functions of the mobile terminal, and is not limited herein.
The interface unit 108 serves as an interface through which at least one external device is connected to the mobile terminal 100. For example, the external device may include a wired or wireless headset port, an external power supply (or battery charger) port, a wired or wireless data port, a memory card port, a port for connecting a device having an identification module, an audio input/output (I/O) port, a video I/O port, an earphone port, and the like. The interface unit 108 may be used to receive input (e.g., data information, power, etc.) from external devices and transmit the received input to one or more elements within the mobile terminal 100 or may be used to transmit data between the mobile terminal 100 and external devices.
The memory 109 may be used to store software programs as well as various data. The memory 109 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data (such as audio data, a phonebook, etc.) created according to the use of the cellular phone, and the like. Further, memory 109 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.
The processor 110 is a control center of the mobile terminal, connects various parts of the entire mobile terminal using various interfaces and lines, and performs various functions of the mobile terminal and processes data by operating or executing software programs and/or modules stored in the memory 109 and calling data stored in the memory 109, thereby performing overall monitoring of the mobile terminal. Processor 110 may include one or more processing units; preferably, the processor 110 may integrate an application processor, which mainly handles operating systems, user interfaces, application programs, etc., and a modem processor, which mainly handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 110.
The mobile terminal 100 may further include a power supply 111 (e.g., a battery) for supplying power to various components, and preferably, the power supply 111 may be logically connected to the processor 110 via a power management system, so as to manage charging, discharging, and power consumption management functions via the power management system.
Although not shown in fig. 1, the mobile terminal 100 may further include a bluetooth module or the like, which is not described in detail herein.
In order to facilitate understanding of the embodiments of the present invention, a communication network system on which the mobile terminal of the present invention is based is described below.
Referring to fig. 2, fig. 2 is an architecture diagram of a communication Network system according to an embodiment of the present invention, the communication Network system is an LTE system of a universal mobile telecommunications technology, and the LTE system includes a UE (User Equipment) 201, an e-UTRAN (Evolved UMTS Terrestrial Radio Access Network) 202, an epc (Evolved Packet Core) 203, and an IP service 204 of an operator, which are in communication connection in sequence.
Specifically, the UE201 may be the terminal 100 described above, and is not described herein again.
The E-UTRAN202 includes eNodeB2021 and other eNodeBs 2022, among others. The eNodeB2021 may be connected with other eNodeB2022 via backhaul (e.g., X2 interface), the eNodeB2021 is connected to the EPC203, and the eNodeB2021 may provide the UE201 with access to the EPC 203.
The EPC203 may include MME (Mobility Management Entity) 2031, hss (Home Subscriber Server) 2032, other MME2033, SGW (Serving gateway) 2034, pgw (PDN gateway) 2035, PCRF (Policy and Charging Rules Function) 2036, and the like. The MME2031 is a control node that handles signaling between the UE201 and the EPC203, and provides bearer and connection management. HSS2032 is used to provide registers to manage functions such as home location register (not shown) and holds subscriber specific information about service characteristics, data rates, etc. All user data may be sent through SGW2034, PGW2035 may provide IP address assignment for UE201 and other functions, and PCRF2036 is a policy and charging control policy decision point for traffic data flow and IP bearer resources, which selects and provides available policy and charging control decisions for a policy and charging enforcement function (not shown).
The IP services 204 may include the internet, intranets, IMS (IP Multimedia Subsystem), or other IP services, among others.
Although the LTE system is described as an example, it should be understood by those skilled in the art that the present invention is not limited to the LTE system, but may also be applied to other wireless communication systems, such as GSM, CDMA2000, WCDMA, TD-SCDMA, and future new network systems.
Based on the above mobile terminal hardware structure and communication network system, the present invention provides various embodiments of the method.
Example one
Fig. 3 is a flowchart of a first embodiment of an adaptive constellation mapping method according to the present invention. An adaptive constellation mapping method, the method comprising:
s1, calculating to obtain a first constellation range of the current equipment in an ideal shooting state according to sensor information, time information and position information of the current equipment, star catalogue information corresponding to the position information and field angle information of a camera of the current equipment.
S2, acquiring a shooting preview image of the camera, and acquiring a sky area in the shooting preview image through a preset sky segmentation algorithm.
S3, determining stars falling into the sky region in each constellation in the first constellation range in the range of the sky region, and determining the number of the stars and the position of the sky region.
And S4, determining a target constellation according to the number and the position, and fusing the image of the target constellation to the shooting preview image.
In this embodiment, a mobile phone is taken as an example for explanation, first, the acceleration sensor, the magnetic sensor, the GPS information, the current time and the FOV view angle information of the mobile phone camera are obtained, and the constellation that can be captured theoretically by the current mobile phone camera is calculated by using these information; then, acquiring an image of a camera, and acquiring a sky area in the image by using a sky segmentation algorithm; then, the number of stars of each constellation in the sky area in the first step is counted, and a focus constellation is selected. And if the constellation with the largest number of stars is only one, selecting the constellation with the largest number of stars as the target constellation. Otherwise, counting the geometric center of the constellation with the most constellations and the geometric center of the sky region, and selecting the constellation with the geometric center closest to the geometric center of the sky region as a target constellation; and finally, attaching the target constellation to the sky area of the image.
The method has the advantages that a first constellation range of the current equipment in an ideal shooting state is obtained through calculation according to sensor information, time information and position information of the current equipment, star catalogue information corresponding to the position information and field angle information of a camera of the current equipment; acquiring a shooting preview image of the camera, and acquiring a sky area in the shooting preview image through a preset sky segmentation algorithm; determining, in each constellation in the first constellation range, stars in the sky region, and determining a number of the stars and a location of the stars in the sky region, within the sky region; and determining a target constellation according to the number and the position, and fusing the image of the target constellation to the shooting preview image. A humanized constellation mapping processing scheme is realized, starry sky shooting is not limited by a light environment any more, and adaptability and stability of starry sky shooting are greatly enhanced.
Example two
Fig. 4 is a flowchart of a second embodiment of the adaptive constellation mapping method of the present invention, and based on the above embodiment, the calculating is performed to obtain a first constellation range of the current device in an ideal shooting state according to sensor information, time information, and location information of the current device, star catalogue information corresponding to the location information, and field angle information of a camera of the current device, where the method includes:
s11, determining longitude and latitude information of the celestial bodies of each constellation on a preset celestial sphere according to the star table information.
S12, creating a celestial sphere model of the celestial sphere according to a preset graphic processing interface and the longitude and latitude information, and controlling the celestial sphere model to rotate according to the time difference between the time information and the star information.
Alternatively, in this embodiment, the earth is regarded as a point, and there is a large concentric sphere outside the earth, called celestial sphere, on which all stars (except the sun) are located; the relative position of the fixed star on the celestial sphere is unchanged; they are seen moving on the earth because the celestial sphere is rotating. Based on this, the calculation method of the embodiment includes two aspects, that is, a J2000.0 star catalogue is obtained from the national astronomical phenomena, and 693 stars containing 88 constellations have longitude and latitude on the celestial sphere in 1 month and 1 day in 2000; secondly, an open graphics library (OpenGL) image processing interface is utilized to establish a celestial sphere model according to a star table, and then a celestial sphere is rotated according to the current time and the time difference of J2000.0.
The method has the advantages that the longitude and latitude information of the celestial bodies of each constellation on the preset celestial sphere is determined through the star table information; and creating a celestial sphere model of the celestial sphere according to a preset graphic processing interface and the longitude and latitude information, and controlling the celestial sphere model to rotate according to the time difference between the time information and the star catalogue information. A humanized constellation mapping processing scheme is realized, starry sky shooting is not limited by a light environment any more, and adaptability and stability of starry sky shooting are greatly enhanced.
EXAMPLE III
Fig. 5 is a flowchart of a third embodiment of the adaptive constellation mapping method according to the present invention, where based on the above embodiment, the first constellation range of the current device in an ideal shooting state is obtained through calculation according to sensor information, time information, and position information of the current device, star catalogue information corresponding to the position information, and field angle information of a camera of the current device, and the method further includes:
and S13, determining the shooting position and the shooting direction of the camera according to the sensor information, the position information and the field angle information by taking the sphere center of the celestial sphere model as an observation point.
And S14, obtaining a model view projection matrix of the celestial sphere model in a rotating state by calling a preset function of the graphic processing interface.
Optionally, in this embodiment, first, the spherical center is taken as an observation point, and information such as the position and the orientation of the camera in OpenGL, that is, parameters of the gluLockAt and glu _ perspective functions, can be obtained according to the information of the acceleration sensor, the magnetic sensor, the GPS, and the FOV angle of the mobile phone camera; then, calling the gluLockAt and the glu _ persistent function to obtain an MVP model view projection transformation matrix.
The method has the advantages that the center of the celestial sphere model is used as an observation point, and the shooting position and the shooting direction of the camera are determined according to the sensor information, the position information and the angle of view information; and obtaining a model view projection matrix of the celestial sphere model in a rotating state by calling a preset function of the graphic processing interface. A humanized constellation mapping processing scheme is realized, starry sky shooting is not limited by a light environment any more, and adaptability and stability of starry sky shooting are greatly enhanced.
Example four
Fig. 6 is a flowchart of a fourth embodiment of the adaptive constellation mapping method according to the present invention, where based on the above embodiments, the first constellation range of the current device in an ideal shooting state is obtained through calculation according to sensor information, time information, and position information of the current device, star catalogue information corresponding to the position information, and field angle information of a camera of the current device, and the method further includes:
and S15, carrying out matrix transformation on the coordinates of all stars on the celestial sphere model according to the model view projection matrix to obtain the projection positions of all stars projected onto a preset view plane.
S16, keeping stars in a preset range and a constellation to which the stars belong on the view plane, and taking the constellation as the first constellation range.
Optionally, in this embodiment, coordinates of stars on the celestial sphere are converted by a conversion matrix to obtain the positions where they are projected onto the view plane.
Optionally, in this embodiment, only the stars projected in the view and the constellation in which they are located are retained as the first constellation range in the ideal state of shooting.
The method has the advantages that the coordinates of all the stars on the celestial sphere model are subjected to matrix transformation through the model view projection matrix, and projection positions of all the stars projected onto a preset view plane are obtained; and reserving stars in a preset range and a constellation to which the stars belong on the view plane, and taking the constellation as the first constellation range. A humanized constellation mapping processing scheme is realized, the starry sky shooting is not limited by the light environment any more, and the adaptability and the stability of the starry sky shooting are greatly enhanced.
EXAMPLE five
Fig. 7 is a flowchart of a fifth embodiment of an adaptive constellation mapping method according to the present invention, where based on the above embodiments, the acquiring a preview image taken by a camera and acquiring a sky area in the preview image taken by a preset sky segmentation algorithm includes:
s21, training a sky mask image through a preset depth model and sky image data to obtain the sky segmentation model.
S22, inputting the shooting preview image into the sky segmentation model, and performing sky segmentation on the shooting preview image through a sky segmentation algorithm of the sky segmentation model to obtain the sky area.
Optionally, in this embodiment, training is performed by using an n2netp depth model, a hundred thousand sky pictures and a sky mask map corresponding to the sky pictures, where a pixel value of a sky region is 255 and a non-sky region is 0, so as to obtain a sky segmentation model. When the model runs, a shooting preview image of the camera is input into the model to obtain a corresponding sky mask image. And carrying out sky segmentation on the sky mask image to obtain the sky area.
The method has the advantages that the sky mask image is trained through the preset depth model and the sky image data, and the sky segmentation model is obtained; inputting the shooting preview image into the sky segmentation model, and performing sky segmentation on the shooting preview image through a sky segmentation algorithm of the sky segmentation model to obtain the sky area. A humanized constellation mapping processing scheme is realized, the starry sky shooting is not limited by the light environment any more, and the adaptability and the stability of the starry sky shooting are greatly enhanced.
EXAMPLE six
Fig. 8 is a flowchart of a sixth embodiment of an adaptive constellation mapping method according to the present invention, in which, based on the above embodiment, determining stars in the sky region in each constellation in the first constellation range, and determining the number of the stars and the position of the stars in the sky region, the method includes:
and S31, acquiring the number of stars in each constellation within the range of the first constellation.
And S32, if the constellation with the maximum number of the stars is unique, taking the constellation with the maximum number of the stars as the target constellation.
Optionally, in this embodiment, please refer to a constellation diagram in the theoretical shooting state shown in fig. 11. And determining a constellation which can be shot by the current mobile phone camera theoretically as a first constellation range. Please refer to a shooting preview diagram shown in fig. 12. Wherein the figure shows the image content of the actual captured preview image without any stars being displayed. Further, please refer to the sky mask map shown in fig. 13. The method comprises the steps of inputting a shooting preview image of a camera into a model to obtain a corresponding sky mask image, and then carrying out sky segmentation on the sky mask image to obtain the sky area.
Optionally, in this embodiment, please refer to the schematic diagram of constellation selection shown in fig. 14, wherein the target constellation is selected according to the number and position of stars in the sky. For example, if the constellation with the largest number of stars is unique, the constellation with the largest number of stars is taken as the target constellation.
The method has the advantages that the number of stars in each constellation is obtained within the range of the first constellation; and if the constellation with the maximum number of the stars is unique, taking the constellation with the maximum number of the stars as the target constellation. A humanized constellation mapping processing scheme is realized, starry sky shooting is not limited by a light environment any more, and adaptability and stability of starry sky shooting are greatly enhanced.
EXAMPLE seven
Fig. 9 is a flowchart of a seventh embodiment of an adaptive constellation mapping method according to the present invention, in which, based on the above embodiment, determining stars in each constellation in the first constellation range that falls into the sky region, and determining the number of the stars and the position of the stars in the sky region, the method further includes:
and S33, if the constellation with the largest number of stars is more than one, classifying the plurality of constellations with the largest number of stars into a second constellation range.
And S34, in the second constellation range, obtaining a distance value between a constellation geometric center of each constellation and a region geometric center of the sky region, and taking the constellation with the minimum distance value as the target constellation.
Optionally, in this embodiment, the geometric center of the constellation is an average of the projection coordinates of all stars of the constellation, and the geometric center of the sky area is an average of the coordinates of a sky pixel with a value of 255 in the mask map.
The method has the advantages that the multiple constellations with the largest number of stars are classified into a second constellation range by judging that if the constellation with the largest number of stars is more than one; and in the second constellation range, acquiring a distance value between a constellation geometric center of each constellation and a region geometric center of the sky region, and taking the constellation with the minimum distance value as the target constellation. A humanized constellation mapping processing scheme is realized, the starry sky shooting is not limited by the light environment any more, and the adaptability and the stability of the starry sky shooting are greatly enhanced.
Example eight
Fig. 10 is a flowchart of an eighth embodiment of the adaptive constellation mapping method according to the present invention, where based on the above embodiments, the determining a target constellation according to the number and the position, and fusing an image of the target constellation to the shooting preview image includes:
s41, setting the star image parameters of the target constellation according to the image parameters of the shooting preview image.
And S42, fusing the image of the target constellation to the shooting preview image according to the star image parameters.
Optionally, in this embodiment, please refer to the image fusion schematic diagram shown in fig. 15. And setting the star image parameters of the target constellation according to the image parameters of the shot preview image, so that the presentation effect of the star is kept consistent with the background.
The method has the advantages that the star image parameters of the target constellation are set through the image parameters of the shot preview image; and fusing the image of the target constellation to the shooting preview image according to the star image parameters. A humanized constellation mapping processing scheme is realized, starry sky shooting is not limited by a light environment any more, and adaptability and stability of starry sky shooting are greatly enhanced.
Example nine
Based on the foregoing embodiments, the present invention further provides an adaptive constellation mapping apparatus, which includes a memory, a processor, and a computer program stored on the memory and executable on the processor, where the computer program, when executed by the processor, implements the steps of the adaptive constellation mapping method according to any one of the foregoing embodiments.
It should be noted that the apparatus embodiment and the method embodiment belong to the same concept, and specific implementation processes thereof are detailed in the method embodiment, and technical features in the method embodiment are applicable in the apparatus embodiment, which is not described herein again.
EXAMPLE ten
Based on the foregoing embodiment, the present invention further provides a computer-readable storage medium, where an adaptive constellation mapping program is stored, and when executed by a processor, the adaptive constellation mapping program implements the steps of the adaptive constellation mapping method as described in any one of the foregoing embodiments.
It should be noted that the media embodiment and the method embodiment belong to the same concept, and specific implementation processes thereof are detailed in the method embodiment, and technical features in the method embodiment are correspondingly applicable in the media embodiment, which is not described herein again.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one of 8230, and" comprising 8230does not exclude the presence of additional like elements in a process, method, article, or apparatus comprising the element.
The above-mentioned serial numbers of the embodiments of the present invention are only for description, and do not represent the advantages and disadvantages of the embodiments.
Through the description of the foregoing embodiments, it is clear to those skilled in the art that the method of the foregoing embodiments may be implemented by software plus a necessary general hardware platform, and certainly may also be implemented by hardware, but in many cases, the former is a better implementation. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal (such as a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present invention.
While the present invention has been described with reference to the embodiments shown in the drawings, the present invention is not limited to the embodiments, which are illustrative and not restrictive, and it will be apparent to those skilled in the art that various changes and modifications can be made therein without departing from the spirit and scope of the invention as defined in the appended claims.

Claims (10)

1. An adaptive constellation mapping method, the method comprising:
calculating to obtain a first constellation range of the current equipment in an ideal shooting state according to sensor information, time information and position information of the current equipment, star chart information corresponding to the position information and field angle information of a camera of the current equipment;
acquiring a shooting preview image of the camera, and acquiring a sky area in the shooting preview image through a preset sky segmentation algorithm;
determining, within the sky region, stars in each constellation within the first constellation range that fall within the sky region, and determining a number of the stars and a location of the stars in the sky region;
and determining a target constellation according to the number and the position, and fusing the image of the target constellation to the shooting preview image.
2. The adaptive constellation mapping method according to claim 1, wherein the calculating, according to sensor information, time information, and position information of a current device, star table information corresponding to the position information, and field angle information of a camera of the current device, a first constellation range of the current device in an ideal photographing state includes:
determining longitude and latitude information of the stars of each constellation on a preset celestial sphere according to the star table information;
and creating a celestial sphere model of the celestial sphere according to a preset graphic processing interface and the longitude and latitude information, and controlling the celestial sphere model to rotate according to the time difference between the time information and the star catalogue information.
3. The adaptive constellation mapping method according to claim 2, wherein the calculating, according to sensor information, time information, and position information of a current device, star catalogue information corresponding to the position information, and field angle information of a camera of the current device, obtains a first constellation range of the current device in an ideal shooting state, and further includes:
determining the shooting position and the shooting orientation of the camera according to the sensor information, the position information and the field angle information by taking the sphere center of the celestial sphere model as an observation point;
and obtaining a model view projection matrix of the celestial sphere model in a rotating state by calling a preset function of the graphic processing interface.
4. The adaptive constellation mapping method according to claim 3, wherein the calculating, according to sensor information, time information, and position information of a current device, star catalogue information corresponding to the position information, and field angle information of a camera of the current device, obtains a first constellation range of the current device in an ideal shooting state, and further includes:
carrying out matrix transformation on the coordinates of all stars on the celestial sphere model according to the model view projection matrix to obtain projection positions of all stars projected onto a preset view plane;
and reserving stars in a preset range and a constellation to which the stars belong on the view plane, and taking the constellation as the first constellation range.
5. The adaptive constellation mapping method according to claim 4, wherein the obtaining a preview image of the camera and obtaining a sky region in the preview image through a preset sky segmentation algorithm comprises:
training a sky mask image through a preset depth model and sky image data to obtain a sky segmentation model;
inputting the shooting preview image into the sky segmentation model, and performing sky segmentation on the shooting preview image through a sky segmentation algorithm of the sky segmentation model to obtain the sky area.
6. The adaptive constellation mapping method of claim 5 wherein determining, within the sky region, stars in each constellation within the first constellation that falls within the sky region, and determining a number of the stars and a location of the stars in the sky region comprises:
acquiring the number of stars in each constellation within the range of the first constellation;
and if the constellation with the maximum number of the stars is unique, taking the constellation with the maximum number of the stars as the target constellation.
7. The adaptive constellation mapping method of claim 6, wherein said determining, for the region of the sky, stars in each constellation within the first constellation that fall within the region of the sky, and determining a number of the stars and a location of the stars in the region of the sky, further comprises:
if the constellation with the largest number of stars is more than one, classifying the plurality of constellations with the largest number of stars into a second constellation range;
and in the second constellation range, acquiring a distance value between a constellation geometric center of each constellation and a region geometric center of the sky region, and taking the constellation with the minimum distance value as the target constellation.
8. The adaptive constellation mapping method of claim 7, wherein said determining a target constellation according to the number and the position and fusing an image of the target constellation to the capture preview image comprises:
setting the star image parameters of the target constellation according to the image parameters of the shot preview image;
and fusing the image of the target constellation to the shooting preview image according to the star image parameters.
9. An adaptive constellation mapping apparatus, characterized in that the apparatus comprises a memory, a processor and a computer program stored on the memory and executable on the processor, which computer program, when executed by the processor, implements the steps of the adaptive constellation mapping method according to any one of claims 1 to 8.
10. A computer readable storage medium, characterized in that the computer readable storage medium has stored thereon an adaptive constellation mapping program, which when executed by a processor implements the steps of the adaptive constellation mapping method according to any of claims 1 to 8.
CN202210736698.8A 2022-06-27 2022-06-27 Self-adaptive constellation mapping method, equipment and computer readable storage medium Pending CN115205436A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210736698.8A CN115205436A (en) 2022-06-27 2022-06-27 Self-adaptive constellation mapping method, equipment and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210736698.8A CN115205436A (en) 2022-06-27 2022-06-27 Self-adaptive constellation mapping method, equipment and computer readable storage medium

Publications (1)

Publication Number Publication Date
CN115205436A true CN115205436A (en) 2022-10-18

Family

ID=83578244

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210736698.8A Pending CN115205436A (en) 2022-06-27 2022-06-27 Self-adaptive constellation mapping method, equipment and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN115205436A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115994982A (en) * 2023-03-22 2023-04-21 中科星图测控技术股份有限公司 Giant constellation situation display method based on OSG

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115994982A (en) * 2023-03-22 2023-04-21 中科星图测控技术股份有限公司 Giant constellation situation display method based on OSG
CN115994982B (en) * 2023-03-22 2023-07-07 中科星图测控技术股份有限公司 Giant constellation situation display method based on OSG

Similar Documents

Publication Publication Date Title
CN107105166B (en) Image photographing method, terminal, and computer-readable storage medium
CN109471571B (en) Display method of suspension control, mobile terminal and computer readable storage medium
CN108241752B (en) Photo display method, mobile terminal and computer readable storage medium
CN107979667B (en) Dual-screen display method, mobile terminal and computer-readable storage medium
CN111654628B (en) Video shooting method and device and computer readable storage medium
CN107230065B (en) Two-dimensional code display method and device and computer readable storage medium
CN111866388B (en) Multiple exposure shooting method, equipment and computer readable storage medium
CN112188082A (en) High dynamic range image shooting method, shooting device, terminal and storage medium
CN107896304B (en) Image shooting method and device and computer readable storage medium
CN108848321B (en) Exposure optimization method, device and computer-readable storage medium
CN113347364A (en) Moon image shooting method and device and computer readable storage medium
CN108282608B (en) Multi-region focusing method, mobile terminal and computer readable storage medium
CN112135060B (en) Focusing processing method, mobile terminal and computer storage medium
CN113301253A (en) Auxiliary shooting method of astronomical image, mobile terminal and storage medium
CN115205436A (en) Self-adaptive constellation mapping method, equipment and computer readable storage medium
CN112135045A (en) Video processing method, mobile terminal and computer storage medium
CN111614902A (en) Video shooting method and device and computer readable storage medium
CN114040073A (en) Starry sky image shooting processing method and equipment and computer readable storage medium
CN112532838B (en) Image processing method, mobile terminal and computer storage medium
CN109215004B (en) Image synthesis method, mobile terminal and computer readable storage medium
CN113473029A (en) Lightning image shooting method and device and computer readable storage medium
CN107959793B (en) Image processing method, terminal and storage medium
CN113542605A (en) Camera shooting control method, mobile terminal and storage medium
CN107784629B (en) Panoramic photo filter processing method and mobile terminal
CN109495683B (en) Interval shooting method and device and computer readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination