CN117950561B - ArcGIS and photoshop automatic linkage image processing method and device - Google Patents

ArcGIS and photoshop automatic linkage image processing method and device Download PDF

Info

Publication number
CN117950561B
CN117950561B CN202410352316.0A CN202410352316A CN117950561B CN 117950561 B CN117950561 B CN 117950561B CN 202410352316 A CN202410352316 A CN 202410352316A CN 117950561 B CN117950561 B CN 117950561B
Authority
CN
China
Prior art keywords
image
photoshop
temporary
partition
arcgis
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202410352316.0A
Other languages
Chinese (zh)
Other versions
CN117950561A (en
Inventor
李曦凌
何仕强
罗中权
陈科
杨彦梅
杨娅楠
申琳
姜咏絮
何南
陆大进
保振永
汪诗奇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
General Institute Of Hydropower And Water Resources Planning And Design Co ltd
Yunnan Institute Of Conservancy And Hydropower Sciences
PowerChina Kunming Engineering Corp Ltd
Original Assignee
General Institute Of Hydropower And Water Resources Planning And Design Co ltd
Yunnan Institute Of Conservancy And Hydropower Sciences
PowerChina Kunming Engineering Corp 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 General Institute Of Hydropower And Water Resources Planning And Design Co ltd, Yunnan Institute Of Conservancy And Hydropower Sciences, PowerChina Kunming Engineering Corp Ltd filed Critical General Institute Of Hydropower And Water Resources Planning And Design Co ltd
Priority to CN202410352316.0A priority Critical patent/CN117950561B/en
Publication of CN117950561A publication Critical patent/CN117950561A/en
Application granted granted Critical
Publication of CN117950561B publication Critical patent/CN117950561B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Processing Or Creating Images (AREA)

Abstract

The invention belongs to the technical field of remote sensing image processing, and particularly relates to a processing method and a device for an ArcGIS and Photoshop automatic linkage image. The automatic process reduces errors in manual data conversion and editing, maintains the integrity and accuracy of image data, solves the problems of low efficiency, complex operation and difficult collaboration in the traditional remote sensing image processing method, and improves the quality and reliability of fine editing processing.

Description

ArcGIS and photoshop automatic linkage image processing method and device
Technical Field
The invention belongs to the technical field of remote sensing image processing, and particularly relates to a method and a device for processing an ArcGIS and photoshop automatic linkage image.
Background
ArcGIS is one of the main software in the Geographic Information System (GIS) field, providing management, analysis and visualization functions of geospatial data. It also supports some basic remote sensing image processing functions, mainly functions of calculation of raster data, space analysis and the like.
PCI Geomatica is a specialized remote sensing image processing software, which is widely applied to analysis and interpretation of satellite images.
In the production of remote sensing images for mapping geographic information, the adjustment of local details of the images is often carried out by cutting images in professional remote sensing software, then editing in detail in Photoshop, and finally merging a plurality of edited parts into a new remote sensing image.
The existing remote sensing image software is mainly focused on aspects of remote sensing image classification, extraction, detection, scientific analysis, visualization and the like, and for fine editing processing, such as color adjustment, local image correction, correction of distorted images and the like, software with more image editing expertise, such as Adobe Photoshop (hereinafter referred to as PS) is generally required. However, the process involves multiple steps, which has high requirements for professionals, requires users to switch back and forth between different software, and has the problems of low efficiency, complex operation, difficult collaboration and the like, especially when processing a large number of or oversized remote sensing images.
Disclosure of Invention
According to a first aspect of the present invention, the present invention provides a method for processing an ArcGIS and photoshop automatic linkage image, which is characterized by comprising:
acquiring images selected by a user and drawn rectangular partitions in an Arcmap plug-in interface;
the drawn data of the rectangular partition are stored in a list and displayed in a form control, partition data drawn by a user are encoded into RECTANGLEDATA types of examples, and metadata of each cut image partition is stored;
Cutting the images according to the partitions, generating temporary image data, calling a cutting tool of the ArcGIS by the plug-in unit, cutting the images according to the rectangular partitions, and storing the cutting result as a temporary file;
Importing the temporary image data into Photoshop, and tracking the editing state, and starting a file system monitor to track the editing operation of a user after the temporary image data is automatically imported into Photoshop;
Detecting the operation state of a user on the temporary image data in the Photoshop, performing image mosaic after all the temporary images of the partitions are stored, replacing the corresponding areas in the original image with the images stored in the Photoshop, monitoring the change of Photoshop files through FILESYSTEMWATCHER, detecting the change of the file state after the user finishes editing and storing the temporary images, and triggering the subsequent image mosaic operation.
Further, the acquiring the image selected by the user and the drawn rectangular partition in the ArcMap plug-in interface further includes:
the remote sensing image is represented as IRASTERLAYER objects, and the IRASTERLAYER objects are objects used for representing raster data layers in ESRI ARCGIS software;
IRASTERLAYER contain spatial references to raster data, pixel value types, and other display and analysis related attributes;
after a user draws a rectangular partition in a plug-in interface, the plug-in creates a IEnvelope object according to the spatial range of the rectangular partition;
The IEnvelope object is an interface defined in ArcGIS, and is used for describing a minimum bounding box of a rectangular area, where the minimum bounding box contains minimum and maximum X, Y coordinate values in a coordinate system, and determining the precise position and range of the clipping area.
Further, the drawn data of the rectangular partition is stored in a list and displayed in a form control, the partition data drawn by the user is encoded into RECTANGLEDATA kinds of instances, metadata of each clipping image partition is stored, and the method further comprises:
the partition data drawn by the user is encoded into RECTANGLEDATA class examples, and metadata of each clipping image partition is stored, wherein the metadata at least comprises:
ISSELECTED: boolean type Boolean, indicate whether the partition is selected for processing;
ID: string, providing a unique identifier for each partition;
width and Height: floating point number Double, the width and height of the designated clipping region;
Status: string, describing the processing state of the partition, including at least "unprocessed", "in-process", "completed";
Area: floating point number Double, the area of rectangular area calculated;
PixelCount: integer intelger, number of pixels in clipping region;
pEnvelope: IEnvelope types, clipping the spatial range of the region;
path: string, the storage route of the image data after cutting.
Further, the drawn data of the rectangular partition is stored in a list and displayed in a form control, the partition data drawn by the user is encoded into RECTANGLEDATA kinds of instances, metadata of each clipping image partition is stored, and the method further comprises:
creating and managing a temporary file directory, creating a temporary file directory for each RECTANGLEDATA example, wherein the directory is used for storing temporary files of the images, and cleaning after the image processing flow is finished;
The form control data binding and interface updating LISTRECTANGLEDATA list stores all rectangle partition data drawn by the user, each data item is an example of RECTANGLEDATA class, and the plug-in interface contains a form control which is connected with the LISTRECTANGLEDATA list through a data binding mechanism.
Further, the method includes the steps that image cutting is performed according to the partitions, temporary image data are generated, the plug-in unit calls a cutting tool of ArcGIS, images are cut according to the rectangular partitions, cutting results are stored as temporary files, and the method further includes the steps of:
the clipping flow is refined, and the plug-in executes the clipping flow by calling the API of the ArcGIS:
defining clipping parameters, firstly determining clipping operation parameters including IRASTERLAYER interfaces of the selected images and IEnvelope limits drawn by a user;
Executing a clipping command, and extracting the intersecting part of the remote sensing image and IEnvelope by using the clipping function of the IRASTERLAYER interface to form a new IRaster object;
the color depth and the wave band are set, so that the cut image can be correctly opened in Photoshop, the color depth is set to 8 bits and the wave band number is set to 3 during cutting, and the compatibility with Photoshop is ensured;
Determining a temporary file format, and selecting a Photoshop compatible image file format as a storage format of a cut image;
Generating and managing temporary files, generating a temporary path, and calling a Path. GetTempFileName () method by a plug-in to generate a temporary file path, wherein the path points to a temporary file directory defined by an operating system;
saving the cut image, and utilizing the saving function of IRaster interface of ArcGIS to derive the cut image into the temporary file path generated in the last step, the name is CLIPRASTER _ "+UID of the cutting area;
And updating RECTANGLEDATA information, and storing the generated temporary file path in the path attribute corresponding to the RECTANGLEDATA instance, so that the subsequent step reference is facilitated.
Further, the step of importing the temporary image data into Photoshop and tracking the editing state, after the temporary image data is automatically imported into Photoshop, starting a file system monitor to track the editing operation of the user, further comprises:
photoshop is called through JavaScript, and a corresponding temporary image file is opened for editing by a user;
The file system monitor FILESYSTEMWATCHER tracks changes to the Photoshop file, capturing edit save events.
Further, the detecting the operation state of the user on the temporary image data in the Photoshop, after all the temporary images of the partitions are stored, performing image mosaic, replacing the corresponding area in the original image with the image stored in the Photoshop, monitoring the change of the Photoshop file through FILESYSTEMWATCHER, after the user finishes editing and storing the temporary image, detecting the change of the file state, triggering the subsequent image mosaic operation, and further comprising:
The system firstly verifies whether the change is matched with the temporary image file in tracking or not when FILESYSTEMWATCHER detects a file change event stored by Photoshop;
After validation, the Status attribute of the corresponding RECTANGLEDATA object in update LISTRECTANGLEDATA is marked as "edited";
associating the status string parameters with the ID of RECTANGLEDATA objects to accurately identify and update the correct partition status;
The mosaic operation is carried out, after all the partition states to be edited are marked as edited, the system executes the mosaic operation and is completed through a grid processing tool of the ArcGIS, and the corresponding region in the original remote sensing image is updated by using the image file saved after editing in the Photoshop;
Traversing LISTRECTANGLEDATA the list, calling a grid mosaic tool of the ArcGIS and a IMosaicRaster interface for each partition marked as 'PSsaved', and mosaicing and merging the edited image and the original image;
the mosaic operation ensures that new image segments seamlessly blend into the original dataset, taking into account spatial alignment and pixel value matching.
According to a second aspect of the present invention, the present invention provides an ArcGIS and photoshop automatic linkage image processing apparatus, which is characterized by comprising:
the image partition acquisition module acquires images selected by a user and drawn rectangular partitions in an ArcMAP plug-in interface;
the partition storage module is used for storing the drawn data of the rectangular partition in a list and displaying the data in a form control, coding the partition data drawn by a user into RECTANGLEDATA types of examples and storing the metadata of each cut image partition;
The image cutting module cuts the images according to the subareas and generates temporary image data, the plug-in unit calls a cutting tool of the ArcGIS, cuts the images according to the rectangular subareas, and stores the cutting result as a temporary file;
the PS import module imports the temporary image data into Photoshop and tracks the editing state, and after the temporary image data is automatically imported into the Photoshop, the file system monitor is started to track the editing operation of a user;
The image mosaic module is used for detecting the operation state of a user on the temporary image data in the Photoshop, performing image mosaic after all the temporary images of the subareas are stored, replacing the corresponding area in the original image with the image stored in the Photoshop, monitoring the change of a Photoshop file through FILESYSTEMWATCHER, detecting the change of the file state after the user finishes editing and storing the temporary image, and triggering the subsequent image mosaic operation;
The processing device of the ArcGIS and photoshop automatic linkage image is used for executing the processing method of the ArcGIS and photoshop automatic linkage image.
According to a third aspect of the present invention, the present invention claims an ArcGIS and photoshop automatic linkage image processing device, which is characterized by comprising at least one processor; and a memory communicatively coupled to the at least one processor; the memory stores instructions executable by the at least one processor, and the instructions are programmed to perform the method for processing the ArcGIS and photoshop automatic linkage image.
The invention belongs to the technical field of remote sensing image processing, and particularly relates to a processing method and a device for an ArcGIS and Photoshop automatic linkage image. The automatic process reduces errors in manual data conversion and editing, maintains the integrity and accuracy of image data, solves the problems of low efficiency, complex operation and difficult collaboration in the traditional remote sensing image processing method, and improves the quality and reliability of fine editing processing.
Drawings
FIG. 1 is a workflow diagram of a method for processing an ArcGIS and photoshop automatic linkage image according to an embodiment of the present invention;
FIG. 2 is a block diagram of an ArcGIS and photoshop automatic linkage image processing device according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of an ArcGIS and photoshop automatic linkage image processing device according to an embodiment of the present invention.
Detailed Description
According to a first embodiment of the present invention, referring to fig. 1, the present invention claims a method for processing an ArcGIS and photoshop automatic linkage image, which is characterized by comprising the steps of:
s1, acquiring images selected by a user and drawn rectangular partitions in an Arcmap plug-in interface;
s2, the drawn data of the rectangular partition are stored in a list and displayed in a form control, partition data drawn by a user are encoded into RECTANGLEDATA types of examples, and metadata of each cut image partition are stored;
s3, cutting the images according to the partitions, generating temporary image data, calling a cutting tool of the ArcGIS by the plug-in unit, cutting the images according to the rectangular partitions, and storing cutting results as temporary files;
S4, importing the temporary image data into Photoshop, and tracking the editing state, and starting a file system monitor to track the editing operation of a user after the temporary image data is automatically imported into Photoshop;
S5, detecting the operation state of the user on the temporary image data in the Photoshop, performing image mosaic after all the temporary images of the partitions are stored, replacing the corresponding areas in the original image with the images stored in the Photoshop, monitoring the change of the Photoshop file through FILESYSTEMWATCHER, detecting the change of the file state after the user finishes editing and storing the temporary images, and triggering the subsequent image mosaic operation.
Further, step S1 further includes:
S1.1, a remote sensing image is represented as IRASTERLAYER objects, wherein the IRASTERLAYER objects are objects used for representing raster data layers in ESRI ARCGIS software; IRASTERLAYER contain spatial references to raster data, pixel value types, and other display and analysis related attributes;
S1.2, after a user draws a rectangular partition in a plug-in interface, the plug-in creates a IEnvelope object according to the space range of the rectangular partition; the IEnvelope object is an interface defined in ArcGIS, and is used for describing a minimum bounding box of a rectangular area, where the minimum bounding box contains minimum and maximum X, Y coordinate values in a coordinate system, and determining the precise position and range of the clipping area.
Further, step S2 further includes:
the partition data drawn by the user is encoded into RECTANGLEDATA class examples, and metadata of each clipping image partition is stored, wherein the metadata at least comprises:
ISSELECTED: boolean type Boolean, indicate whether the partition is selected for processing;
ID: string, providing a unique identifier for each partition;
width and Height: floating point number Double, the width and height of the designated clipping region;
Status: string, describing the processing state of the partition, including at least "unprocessed", "in-process", "completed";
Area: floating point number Double, the area of rectangular area calculated;
PixelCount: integer intelger, number of pixels in clipping region;
pEnvelope: IEnvelope types, clipping the spatial range of the region;
path: string, the storage route of the image data after cutting.
Further, step S2 further includes:
S2.1, creating and managing a temporary file directory, creating a temporary file directory for each RECTANGLEDATA example, wherein the directory is used for storing temporary files of images, and cleaning after the image processing flow is finished;
S2.2, binding the form control data and updating an interface, wherein LISTRECTANGLEDATA list stores all rectangular partition data drawn by a user, each data item is an example of RECTANGLEDATA class, and the plug-in interface comprises a form control which is connected with LISTRECTANGLEDATA list through a data binding mechanism.
Wherein in this embodiment, S2.1 further comprises:
S2.1.1, temporary catalog generation: the system uses the Path class provided by the NET framework to generate a directory Path for the temporary file. By calling the Path.GetTempPath () method, the system is able to retrieve the path of the temporary folder assigned for the current user session. The system then uses the path.combine () method to combine the underlying temporary path with a unique identifier specific to the current operation (e.g., the ID of the cropped area) to create a private directory for storing temporary image files.
S2.1.2 temporary file use: when the clipping operation is completed, the generated raster data is exported to the temporary directory created as described above. Export operations rely on the raster data export function provided by ArcGIS to save IRaster objects as image files (typically in TIFF format). The path of the temporary file is stored in the path attribute corresponding to RECTANGLEDATA instances for use in subsequent steps (e.g., photoshop editing).
Life cycle of S2.1.3 temporary files: the created temporary file remains active throughout the image processing flow. Once the image is edited and saved in Photoshop and successfully reintroduced and embedded back into the ArcGIS project, the system will no longer need these temporary files. At this point, the system will perform a clean-up operation, deleting the temporary directory and its contents. This is typically accomplished by listening to the save event of Photoshop and, after confirming that the image has been successfully mosaic, calling the directory () method of the NET framework, deleting the entire directory and all related files to free up storage space and avoid data redundancy. The cleanup operation may be performed automatically when the user closes the ArcMap plug-in or ends the editing session, ensuring that no useless temporary files remain after the editing task is completed.
Step S2.2 further comprises:
s2.2.1 implement data binding: the data source attributes of the form control are set to LISTRECTANGLEDATA lists. When changes occur to the list, such as adding new rectangular partition data or updating the state of existing data, the form control automatically reflects these changes.
S2.2.2 user interface feedback: to enhance the user experience, form controls provide various visual feedback. For example, rectangular partitions of different states may display different color encodings, so that the user can clearly identify which partitions have been processed, which are processing, and which have not yet begun processing.
S2.2.3 interactive operations support: the user may interact with the rectangular partition data through the form control. For example, a user may select one or more partitions for editing, deleting, or viewing detailed information.
S2.2.4 real-time update mechanism: after the user edits and saves the temporary image data in Photoshop, the system captures this event and updates LISTRECTANGLEDATA the state of the corresponding partition in the list. The form control is updated accordingly, reflecting the latest state, such as changing from "editing" to "editing complete".
Further, step S3 further includes:
S3.1, refining the clipping flow, and executing the clipping flow by the plug-in through calling the API of the ArcGIS: defining clipping parameters, firstly determining clipping operation parameters including IRASTERLAYER interfaces of the selected images and IEnvelope limits drawn by a user; executing a clipping command, and extracting the intersecting part of the remote sensing image and IEnvelope by using the clipping function of the IRASTERLAYER interface to form a new IRaster object; the color depth and the wave band are set, so that the cut image can be correctly opened in Photoshop, the color depth is set to 8 bits and the wave band number is set to 3 during cutting, and the compatibility with Photoshop is ensured; determining a temporary file format, and selecting a Photoshop compatible image file format as a storage format of a cut image;
S3.2, generating and managing temporary files, generating a temporary path, and calling a Path. GetTempFileName () method by the plug-in to generate a temporary file path, wherein the path points to a temporary file directory defined by an operating system; saving the cut image, and utilizing the saving function of IRaster interface of ArcGIS to derive the cut image into the temporary file path generated in the last step, the name is CLIPRASTER _ "+UID of the cutting area; and updating RECTANGLEDATA information, and storing the generated temporary file path in the path attribute corresponding to the RECTANGLEDATA instance, so that the subsequent step reference is facilitated.
In S3.1, the clipping API in the example uses IExtractionOp interfaces, the optimal color depth value of the clipped 3-band raster data is 8-bit unsigned integer, and the clipping API in ArcGIS is "rstpixeltype.pt_uchar";
when the temporary image data is exported, a plurality of file formats can be selected, such as TIFF, JPEG, PNG, etc., so as to adapt to different editing and using scenes;
further, step S4 further includes:
S4.1, the Photoshop is called through a JavaScript script, and a corresponding temporary image file is opened for editing by a user;
S4.2, the file system monitor FILESYSTEMWATCHER tracks changes to the Photoshop file and captures edit save events.
Further, step S5 further includes:
S5.1, a state updating mechanism, when FILESYSTEMWATCHER detects a file change event stored by Photoshop, the system firstly verifies whether the change is matched with a temporary image file in tracking; after validation, the Status attribute of the corresponding RECTANGLEDATA object in update LISTRECTANGLEDATA is marked as "edited"; associating the status string parameters with the ID of RECTANGLEDATA objects to accurately identify and update the correct partition status;
S5.2, performing mosaic operation, wherein after all partition states to be edited are marked as edited, the system executes the mosaic operation, the mosaic operation is completed through a grid processing tool of an ArcGIS, and the corresponding region in the original remote sensing image is updated by using the image file saved after editing in the Photoshop; traversing LISTRECTANGLEDATA the list, calling a grid mosaic tool of the ArcGIS and a IMosaicRaster interface for each partition marked as 'PSsaved', and mosaicing and merging the edited image and the original image; the mosaic operation ensures that new image segments seamlessly blend into the original dataset, taking into account spatial alignment and pixel value matching.
Wherein, in this embodiment S5, in addition to using the file system monitor, the editing state can be monitored more directly by the API or script function of Photoshop to improve the reliability of the monitoring;
the end of the method may provide an automatic cleaning option for temporary files, allowing the user to choose to clean at a specific point in time or condition to better manage disk space.
The invention adopts an automatic image cutting and Photoshop editing flow, which obviously improves the efficiency and accuracy of the remote sensing image refining processing and reduces the time and labor required by manual cutting and editing.
Manual cropping and editing of a remote sensing image may take 30 minutes before automation is achieved, whereas after automation the entire process may take only 5 minutes.
The invention adopts real-time state monitoring and updating, enhances the transparency of the workflow, and enables the user to know the progress and state of image processing in real time.
In the previous workflow, the user may forget the progress of a certain task, so that reworking is caused, and the state update of each step can be seen through the interface in real time, so that the interactive design of the graphical interface conforming to production habit and the production practice are adopted, and the user without professional large-scale remote sensing software can easily perform the fine processing of the ultra-large remote sensing image.
After the scheme is used, a user can carry out professional and automatic ultra-large remote sensing image fine editing work by only installing ArcGIS software and Photoshop software.
According to a second embodiment of the present invention, referring to fig. 2, the present invention claims an ArcGIS and photoshop automatic linkage image processing apparatus, which is characterized by comprising:
the image partition acquisition module acquires images selected by a user and drawn rectangular partitions in an ArcMAP plug-in interface;
the partition storage module is used for storing the drawn data of the rectangular partition in a list and displaying the data in a form control, coding the partition data drawn by a user into RECTANGLEDATA types of examples and storing the metadata of each cut image partition;
The image cutting module cuts the images according to the subareas and generates temporary image data, the plug-in unit calls a cutting tool of the ArcGIS, cuts the images according to the rectangular subareas, and stores the cutting result as a temporary file;
the PS import module imports the temporary image data into Photoshop and tracks the editing state, and after the temporary image data is automatically imported into the Photoshop, the file system monitor is started to track the editing operation of a user;
The image mosaic module is used for detecting the operation state of a user on the temporary image data in the Photoshop, performing image mosaic after all the temporary images of the subareas are stored, replacing the corresponding area in the original image with the image stored in the Photoshop, monitoring the change of a Photoshop file through FILESYSTEMWATCHER, detecting the change of the file state after the user finishes editing and storing the temporary image, and triggering the subsequent image mosaic operation;
The processing device of the ArcGIS and photoshop automatic linkage image is used for executing the processing method of the ArcGIS and photoshop automatic linkage image.
According to a third embodiment of the present invention, referring to fig. 3, the present invention claims an ArcGIS and photoshop automatic linkage image processing apparatus, which is characterized by comprising at least one processor; and a memory communicatively coupled to the at least one processor; the memory stores instructions executable by the at least one processor, and the instructions are programmed to perform the method for processing the ArcGIS and photoshop automatic linkage image.
Those skilled in the art will appreciate that various modifications and improvements can be made to the disclosure. For example, the various devices or components described above may be implemented in hardware, or may be implemented in software, firmware, or a combination of some or all of the three.
A flowchart is used in this disclosure to describe the steps of a method according to an embodiment of the present disclosure. It should be understood that the steps that follow or before do not have to be performed in exact order. Rather, the various steps may be processed in reverse order or simultaneously. Also, other operations may be added to these processes.
Those of ordinary skill in the art will appreciate that all or a portion of the steps of the methods described above may be implemented by a computer program to instruct related hardware, and the program may be stored in a computer readable storage medium, such as a read only memory, a magnetic disk, or an optical disk. Alternatively, all or part of the steps of the above embodiments may be implemented using one or more integrated circuits. Accordingly, each module/unit in the above embodiment may be implemented in the form of hardware, or may be implemented in the form of a software functional module. The present disclosure is not limited to any specific form of combination of hardware and software.
Unless defined otherwise, all terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this disclosure pertains. It will be further understood that terms, such as those defined in commonly used dictionaries, should be interpreted as having a meaning that is consistent with their meaning in the context of the relevant art and will not be interpreted in an idealized or overly formal sense unless expressly so defined herein.
The foregoing is illustrative of the present disclosure and is not to be construed as limiting thereof. Although a few exemplary embodiments of this disclosure have been described, those skilled in the art will readily appreciate that many modifications are possible in the exemplary embodiments without materially departing from the novel teachings and advantages of this disclosure. Accordingly, all such modifications are intended to be included within the scope of this disclosure as defined in the claims. It is to be understood that the foregoing is illustrative of the present disclosure and is not to be construed as limited to the specific embodiments disclosed, and that modifications to the disclosed embodiments, as well as other embodiments, are intended to be included within the scope of the appended claims. The disclosure is defined by the claims and their equivalents.
In the description of the present specification, reference to the terms "one embodiment," "some embodiments," "illustrative embodiments," "examples," "specific examples," or "some examples," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the invention. In this specification, schematic representations of the above terms do not necessarily refer to the same embodiments or examples. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
While embodiments of the present invention have been shown and described, it will be understood by those of ordinary skill in the art that: many changes, modifications, substitutions and variations may be made to the embodiments without departing from the spirit and principles of the invention, the scope of which is defined by the claims and their equivalents.

Claims (9)

1. The method for processing the ArcGIS and photoshop automatic linkage image is characterized by comprising the following steps of:
acquiring images selected by a user and drawn rectangular partitions in an Arcmap plug-in interface;
the drawn data of the rectangular partition are stored in a list and displayed in a form control, partition data drawn by a user are encoded into RECTANGLEDATA types of examples, and metadata of each cut image partition is stored;
Cutting the images according to the partitions, generating temporary image data, calling a cutting tool of the ArcGIS by the plug-in unit, cutting the images according to the rectangular partitions, and storing the cutting result as a temporary file;
Importing the temporary image data into Photoshop, and tracking the editing state, and starting a file system monitor to track the editing operation of a user after the temporary image data is automatically imported into Photoshop;
Detecting the operation state of a user on the temporary image data in the Photoshop, performing image mosaic after all the temporary images of the partitions are stored, replacing the corresponding areas in the original image with the images stored in the Photoshop, monitoring the change of Photoshop files through FILESYSTEMWATCHER, detecting the change of the file state after the user finishes editing and storing the temporary images, and triggering the subsequent image mosaic operation.
2. The method for processing the ArcGIS and photoshop automatic linkage image according to claim 1, wherein the method for obtaining the image selected by the user and the drawn rectangular partition in the ArcMap plug-in interface further comprises:
the remote sensing image is represented as IRASTERLAYER objects, and the IRASTERLAYER objects are objects used for representing raster data layers in ESRI ARCGIS software;
IRASTERLAYER contain spatial references to raster data, pixel value types, and other display and analysis related attributes;
after a user draws a rectangular partition in a plug-in interface, the plug-in creates a IEnvelope object according to the spatial range of the rectangular partition;
The IEnvelope object is an interface defined in ArcGIS, and is used for describing a minimum bounding box of a rectangular area, where the minimum bounding box contains minimum and maximum X, Y coordinate values in a coordinate system, and determining the precise position and range of the clipping area.
3. The method for processing an ArcGIS and photoshop automatic linkage image according to claim 1, wherein the drawn data of the rectangular partitions are stored in a list and displayed in a form control, the partition data drawn by a user is encoded into RECTANGLEDATA kinds of instances, metadata of each cut image partition is stored, and the method further comprises:
the partition data drawn by the user is encoded into RECTANGLEDATA class examples, and metadata of each clipping image partition is stored, wherein the metadata at least comprises:
ISSELECTED: boolean type Boolean, indicate whether the partition is selected for processing;
ID: string, providing a unique identifier for each partition;
width and Height: floating point number Double, the width and height of the designated clipping region;
Status: string, describing the processing state of the partition, including at least "unprocessed", "in-process", "completed";
Area: floating point number Double, the area of rectangular area calculated;
PixelCount: integer intelger, number of pixels in clipping region;
pEnvelope: IEnvelope types, clipping the spatial range of the region;
path: string, the storage route of the image data after cutting.
4. The method for processing an ArcGIS and photoshop automatic linkage image according to claim 1, wherein the drawn data of the rectangular partitions are stored in a list and displayed in a form control, the partition data drawn by a user is encoded into RECTANGLEDATA kinds of instances, metadata of each cut image partition is stored, and the method further comprises:
creating and managing a temporary file directory, creating a temporary file directory for each RECTANGLEDATA example, wherein the directory is used for storing temporary files of the images, and cleaning after the image processing flow is finished;
The form control data binding and interface updating LISTRECTANGLEDATA list stores all rectangle partition data drawn by the user, each data item is an example of RECTANGLEDATA class, and the plug-in interface contains a form control which is connected with the LISTRECTANGLEDATA list through a data binding mechanism.
5. The method for processing the ArcGIS and photoshop automatic linkage image according to claim 2, wherein the image cropping is performed according to the partition and temporary image data is generated, the plug-in invokes a cropping tool of ArcGIS, crops the image according to the rectangular partition and saves the cropping result as a temporary file, further comprising:
the clipping flow is refined, and the plug-in executes the clipping flow by calling the API of the ArcGIS:
defining clipping parameters, firstly determining clipping operation parameters including IRASTERLAYER interfaces of the selected images and IEnvelope limits drawn by a user;
Executing a clipping command, and extracting the intersecting part of the remote sensing image and IEnvelope by using the clipping function of the IRASTERLAYER interface to form a new IRaster object;
the color depth and the wave band are set, so that the cut image can be correctly opened in Photoshop, the color depth is set to 8 bits and the wave band number is set to 3 during cutting, and the compatibility with Photoshop is ensured;
Determining a temporary file format, and selecting a Photoshop compatible image file format as a storage format of a cut image;
Generating and managing temporary files, generating a temporary path, and calling a Path. GetTempFileName () method by a plug-in to generate a temporary file path, wherein the path points to a temporary file directory defined by an operating system;
saving the cut image, and utilizing the saving function of IRaster interface of ArcGIS to derive the cut image into the temporary file path generated in the last step, the name is CLIPRASTER _ "+UID of the cutting area;
And updating RECTANGLEDATA information, and storing the generated temporary file path in the path attribute corresponding to the RECTANGLEDATA instance, so that the subsequent step reference is facilitated.
6. The method for processing an ArcGIS and Photoshop automatic linkage image according to claim 1, wherein said importing the temporary image data into Photoshop and tracking the editing status, after the temporary image data is automatically imported into Photoshop, starting a file system monitor to track the editing operation of the user, further comprising:
photoshop is called through JavaScript, and a corresponding temporary image file is opened for editing by a user;
The file system monitor FILESYSTEMWATCHER tracks changes to the Photoshop file, capturing edit save events.
7. The method for processing an ArcGIS and Photoshop automatic linkage image according to claim 1, wherein the detecting the operation state of the user on the temporary image data in Photoshop, performing image mosaic after all the temporary images of the partitions are stored, replacing the corresponding area in the original image with the image stored in Photoshop, monitoring the change of the Photoshop file through FILESYSTEMWATCHER, detecting the change of the file state after the user completes editing and stores the temporary image, and triggering the subsequent image mosaic operation, further comprising:
The system firstly verifies whether the change is matched with the temporary image file in tracking or not when FILESYSTEMWATCHER detects a file change event stored by Photoshop;
After validation, the Status attribute of the corresponding RECTANGLEDATA object in update LISTRECTANGLEDATA is marked as "edited";
associating the status string parameters with the ID of RECTANGLEDATA objects to accurately identify and update the correct partition status;
The mosaic operation is carried out, after all the partition states to be edited are marked as edited, the system executes the mosaic operation and is completed through a grid processing tool of the ArcGIS, and the corresponding region in the original remote sensing image is updated by using the image file saved after editing in the Photoshop;
Traversing LISTRECTANGLEDATA the list, calling a grid mosaic tool of the ArcGIS and a IMosaicRaster interface for each partition marked as 'PSsaved', and mosaicing and merging the edited image and the original image;
the mosaic operation ensures that new image segments seamlessly blend into the original dataset, taking into account spatial alignment and pixel value matching.
8. An ArcGIS and photoshop automatic linkage image processing device, which is characterized by comprising:
the image partition acquisition module acquires images selected by a user and drawn rectangular partitions in an ArcMAP plug-in interface;
the partition storage module is used for storing the drawn data of the rectangular partition in a list and displaying the data in a form control, coding the partition data drawn by a user into RECTANGLEDATA types of examples and storing the metadata of each cut image partition;
The image cutting module cuts the images according to the subareas and generates temporary image data, the plug-in unit calls a cutting tool of the ArcGIS, cuts the images according to the rectangular subareas, and stores the cutting result as a temporary file;
the PS import module imports the temporary image data into Photoshop and tracks the editing state, and after the temporary image data is automatically imported into the Photoshop, the file system monitor is started to track the editing operation of a user;
The image mosaic module is used for detecting the operation state of a user on the temporary image data in the Photoshop, performing image mosaic after all the temporary images of the subareas are stored, replacing the corresponding area in the original image with the image stored in the Photoshop, monitoring the change of a Photoshop file through FILESYSTEMWATCHER, detecting the change of the file state after the user finishes editing and storing the temporary image, and triggering the subsequent image mosaic operation;
The processing device of the ArcGIS and photoshop automatic linkage image is used for executing the processing method of the ArcGIS and photoshop automatic linkage image according to any one of claims 2-7.
9. The ArcGIS and photoshop automatic linkage image processing device is characterized by comprising at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being programmed to perform a method of processing ArcGIS and photoshop automated linked images as claimed in any one of claims 1 to 7.
CN202410352316.0A 2024-03-26 2024-03-26 ArcGIS and photoshop automatic linkage image processing method and device Active CN117950561B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410352316.0A CN117950561B (en) 2024-03-26 2024-03-26 ArcGIS and photoshop automatic linkage image processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410352316.0A CN117950561B (en) 2024-03-26 2024-03-26 ArcGIS and photoshop automatic linkage image processing method and device

Publications (2)

Publication Number Publication Date
CN117950561A CN117950561A (en) 2024-04-30
CN117950561B true CN117950561B (en) 2024-06-04

Family

ID=90792467

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410352316.0A Active CN117950561B (en) 2024-03-26 2024-03-26 ArcGIS and photoshop automatic linkage image processing method and device

Country Status (1)

Country Link
CN (1) CN117950561B (en)

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003140544A (en) * 2001-11-07 2003-05-16 Nakanihon Koku Kk Method for discriminating characteristic land feature and device for the same
JP2005004656A (en) * 2003-06-13 2005-01-06 Canon Inc Image processor and its method
JP2008276436A (en) * 2007-04-27 2008-11-13 Univ Of Miyazaki Method and unit for deciding edge line and ridge by image processing
CN108182272A (en) * 2018-01-19 2018-06-19 北京林业大学 The method that Chinese environmental risk map is made based on average area theory
CN109241846A (en) * 2018-08-06 2019-01-18 广州市城市规划勘测设计研究院 Change in time and space estimating and measuring method, device and the storage medium of remote sensing image
CN109377856A (en) * 2018-10-31 2019-02-22 巴中彩颉电子商务有限公司 A kind of regional customization cartography method
CN113129248A (en) * 2021-04-29 2021-07-16 中山大学 Island remote sensing image set obtaining method, device, equipment and medium
CN114489829A (en) * 2021-12-22 2022-05-13 北京市遥感信息研究所 ArcMap-based remote sensing image sample labeling method
CN116502317A (en) * 2023-06-25 2023-07-28 陕西省水利电力勘测设计研究院 Water conservancy and hydropower engineering multisource data fusion method and terminal equipment
CN116563485A (en) * 2023-05-11 2023-08-08 北京云庐科技有限公司 Image fusion method and storage medium for BIM three-dimensional model and GIS map

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9524540B2 (en) * 2014-07-22 2016-12-20 Adobe Systems Incorporated Techniques for automatically correcting groups of images
US10896493B2 (en) * 2018-11-13 2021-01-19 Adobe Inc. Intelligent identification of replacement regions for mixing and replacing of persons in group portraits

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003140544A (en) * 2001-11-07 2003-05-16 Nakanihon Koku Kk Method for discriminating characteristic land feature and device for the same
JP2005004656A (en) * 2003-06-13 2005-01-06 Canon Inc Image processor and its method
JP2008276436A (en) * 2007-04-27 2008-11-13 Univ Of Miyazaki Method and unit for deciding edge line and ridge by image processing
CN108182272A (en) * 2018-01-19 2018-06-19 北京林业大学 The method that Chinese environmental risk map is made based on average area theory
CN109241846A (en) * 2018-08-06 2019-01-18 广州市城市规划勘测设计研究院 Change in time and space estimating and measuring method, device and the storage medium of remote sensing image
CN109377856A (en) * 2018-10-31 2019-02-22 巴中彩颉电子商务有限公司 A kind of regional customization cartography method
CN113129248A (en) * 2021-04-29 2021-07-16 中山大学 Island remote sensing image set obtaining method, device, equipment and medium
CN114489829A (en) * 2021-12-22 2022-05-13 北京市遥感信息研究所 ArcMap-based remote sensing image sample labeling method
CN116563485A (en) * 2023-05-11 2023-08-08 北京云庐科技有限公司 Image fusion method and storage medium for BIM three-dimensional model and GIS map
CN116502317A (en) * 2023-06-25 2023-07-28 陕西省水利电力勘测设计研究院 Water conservancy and hydropower engineering multisource data fusion method and terminal equipment

Also Published As

Publication number Publication date
CN117950561A (en) 2024-04-30

Similar Documents

Publication Publication Date Title
US8533593B2 (en) Hierarchical display and navigation of document revision histories
US8533594B2 (en) Hierarchical display and navigation of document revision histories
US20120271867A1 (en) Hierarchical display and navigation of document revision histories
US20120272192A1 (en) Hierarchical display and navigation of document revision histories
CN112887794B (en) Video editing method and device
US20220270232A1 (en) Apparatus for adjusting parameter related to defect detection for image processing for image processing, method for information processing, and program
JP2003303333A (en) Image display control device
CN117950561B (en) ArcGIS and photoshop automatic linkage image processing method and device
JP3369734B2 (en) Three-dimensional computer-aided design apparatus and method
CN112632303A (en) Distributed storage method, analysis method and device for image data
JP2014154971A (en) Image display device, image display method, and program
US20020154149A1 (en) System, method and computer program product for associative region generation and modification
JP3890096B2 (en) Image editing system
JP4475933B2 (en) Flow diagram creation program and flow diagram creation method
JP3953738B2 (en) Graphic editing device and recording medium storing program for functioning as graphic editing device
CN113222905B (en) Opennsfm and thread.js-based structural damage information updating three-dimensional display method
JP2005063043A (en) Image display device, method and program
JP5720749B2 (en) Display program, display method, and computer
JP2012133459A (en) Apparatus, method and program for estimating image, and computer-readable recording medium storing the program
CN110609882B (en) GIS mobile terminal data processing method capable of preventing blocking
JP2006344245A (en) Program recording medium and data processor
JP2005056010A (en) Device, method and program for defining business form
CN115600573A (en) Template-based data visualization application creation method
CN111292837A (en) Medical image auxiliary diagnosis system and triggering method, device, medium and equipment thereof
CN114529634A (en) Power plant unit rapid positioning method

Legal Events

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