Home Articles Books Search About
日本語
How to Get Coordinates of Sub-Images from a Larger Image

How to Get Coordinates of Sub-Images from a Larger Image

Overview I had an opportunity to obtain the coordinates within a larger image from multiple cropped sub-images. This article is a memo summarizing the method for doing this. I introduce a method using OpenCV’s SIFT (Scale-Invariant Feature Transform) to perform feature point matching between template images and the original image, estimate the affine transformation, and obtain the coordinates. Implementation Required Libraries pip install opencv-python numpy tqdm Python Code The following code matches template images (PNG images in templates_dir) against a specified large image (image_path) using SIFT, and obtains the coordinates within the original image. ...

Enabled Email-Based Registration in the Mirador 3 Firebase-Linked Annotations Plugin

Enabled Email-Based Registration in the Mirador 3 Firebase-Linked Annotations Plugin

Overview I have been developing a Firebase-linked annotations plugin for Mirador 3. Previously, only Google account login functionality was provided, but I have now added email-based login functionality. Feature Introduction Below is the screen after pressing the login button. With email-based login, new account creation is possible. After login, user information is now displayed. Clicking the icon displays a logout button. Summary I hope this serves as a helpful reference for creating and sharing annotations using IIIF. ...

Creating TEI/XML from VTT Files

Creating TEI/XML from VTT Files

Overview This is a memorandum on how to create TEI/XML files from VTT files. Additionally, I will make it possible to access VTT files and TEI/XML files from an IIIF manifest. As a result, as shown below, the TEI/XML file is associated via SeeAlso, and the contents of the VTT file can be accessed from the “Annotations” tab. https://clover-iiif-demo.vercel.app/?manifest=https://movie-tei-demo.vercel.app/data/sdcommons_npl-02FT0102974177/sdcommons_npl-02FT0102974177_vtt.json References I referenced the following efforts from “The Ethiopian Language Archive.” The TEI/XML structuring method was particularly helpful. ...

Using clover-iiif with Next.js

Using clover-iiif with Next.js

Overview I created a sample repository for using clover-iiif with Next.js, so here are my notes. https://clover-iiif-demo.vercel.app/ Background clover-iiif is described as follows. https://github.com/samvera-labs/clover-iiif Extensible IIIF front-end toolkit and Manifest viewer. Accessible. Composable. Open Source. We will use this with Next.js. Data “Koui Genji Monogatari (held by the National Diet Library)” is used as sample data. https://dl.ndl.go.jp/pid/3437686 Repository It is published at the following link. https://github.com/nakamura196/clover-iiif-demo I referenced the following. ...

Downloading Annotations Created with the mirador-annotations Plugin in Mirador 3

Downloading Annotations Created with the mirador-annotations Plugin in Mirador 3

Overview This is a memo on the configuration for downloading annotations created with the mirador-annotations plugin in Mirador 3. https://mirador-annotations.vercel.app/ Background In the following article, I introduced how to register annotations with Google’s Firestore. To download the annotations registered there, the mirador-annotations plugin provides a download option, so I introduce that method here. Method The following is the source code of the demo page. By setting the exportLocalStorageAnnotations option to true, a download icon is displayed. ...

Developed a Firestore Adapter for the Mirador 3 mirador-annotations Plugin

Developed a Firestore Adapter for the Mirador 3 mirador-annotations Plugin

Overview I developed a Firestore adapter for the Mirador 3 mirador-annotations plugin, so this is a personal note. You can try it at the following link. https://mirador-annotations.vercel.app/ Background The Mirador 3 mirador-annotations plugin stores annotations in local storage by default. However, as introduced in the following article, you can save annotations to a different location by changing the adapter. So this time, I developed an adapter to save annotations to Google’s Firestore. ...

Changing the Pagination Limit in Algolia

Changing the Pagination Limit in Algolia

Overview In Algolia, a pagination limit (paginationLimitedTo) is set for search results, and by default, only up to 1,000 results can be accessed. By changing this setting, you can adjust the maximum number of items available through pagination. Configuration Method To change the pagination limit (paginationLimitedTo), the following methods are available. Configuring from the Algolia Dashboard Log in to Algolia Select the target index Open Configuration → Pagination Change the paginationLimitedTo value ...

Prototyping an API for Retrieving Variant Character Lists

Prototyping an API for Retrieving Variant Character Lists

Overview The “Historiographical Institute Database Variant Character Identification List” is published on the following page. https://wwwap.hi.u-tokyo.ac.jp/ships/itaiji_list.jsp This time, I will create an API to retrieve the data published on the above page in JSON format. What Was Developed You can access it from the following URL. https://hi-itaiji.vercel.app/ It returns a mapping using “char (variant character)” from the identification list as the key and the “base” kanji as the value. Summary I hope this serves as a useful reference for applying variant character lists. ...

Using @react-three/fiber and drei with Next 15 (Using React 19)

Using @react-three/fiber and drei with Next 15 (Using React 19)

Overview When using @react-three/fiber with Next 15 (which uses React 19), the following is stated: R3F v8 is not compatible with React 19 or Next 15, which uses React 19. Use the R3F v9 RC instead which can be installed with @react-three/fiber@rc. However, when I added the following for mouse controls, it did not work well with @react-three/fiber@rc. https://www.npmjs.com/package/@react-three/drei This is a note on how to address this issue. ...

Uploading Large Files to Omeka S

Uploading Large Files to Omeka S

Overview I had the opportunity to upload relatively large files (over 200MB) to Omeka S, so this is a memo of the process. Specifically, I uploaded .glb files, a 3D file format used for storing 3D models. Issue Typically, when attempting to upload a relatively large file through the GUI, you may encounter a “POST request exceeded maximum size” error as shown below. Here are some examples of how to address this. ...

A Program to Create TEI/XML Files with OCR Results from IIIF Manifest Files

A Program to Create TEI/XML Files with OCR Results from IIIF Manifest Files

Overview I created a program to generate TEI/XML files containing OCR results from IIIF manifest files. This article explains how to use it. How It Works By specifying the URL of an IIIF manifest file, it creates a TEI/XML file containing OCR results from NDL Kotenseki OCR-Lite. https://github.com/ndl-lab/ndlkotenocr-lite Usage Access the following notebook: https://colab.research.google.com/github/nakamura196/000_tools/blob/main/IIIFマニフェストファイルからTEI_XMLファイルを作成するプログラム.ipynb Then press the first play button. Once complete, update the manifest_url and output_dir values in the “Execute” section and run the cell. ...

Created a Similar Text Search App for the Koui Genji Monogatari

Created a Similar Text Search App for the Koui Genji Monogatari

Overview I created a similar text search app for the Koui Genji Monogatari. You can try it from the following URL. https://huggingface.co/spaces/nakamura196/genji_predict This article introduces how to use the app. Data The text data published on the following Koui Genji Monogatari DB is used. https://kouigenjimonogatari.github.io/ How the App Works The mechanism is simple: text for each volume and page of the Koui Genji Monogatari is prepared in advance, the edit distance from the input string is calculated, and texts (along with volume and page numbers) with high similarity are returned. ...

CORS Configuration for Omeka S Image Server

CORS Configuration for Omeka S Image Server

Overview This is a note on handling CORS configuration for the Omeka S Image Server. Background In the following article, I introduced how to address CORS errors with the Omeka S IIIF Server module. While the above configuration resolved the issue of downloading IIIF manifest files, there were cases where images could not be downloaded, as shown below. Access to image at 'https://xxx/iiif/2/8455/full/86,/0/default.jpg' from origin 'https://uv-v4.netlify.app' has been blocked by CORS policy: The 'Access-Control-Allow-Origin' header contains multiple values '*, *', but only one is allowed. This article describes how to address this issue. ...

Creating AIPs with Archivematica for Files in Alfresco

Creating AIPs with Archivematica for Files in Alfresco

Overview This is an example of how to create AIPs using Archivematica for files in Alfresco. Below is a demo video of the deliverable. https://youtu.be/7WCO7JoMnWc System Configuration For this project, I used the following system configuration. There is no particular significance to using multiple cloud services. Alfresco was built on Azure, referencing the following article. Archivematica and object storage use mdx.jp, and the analysis environment uses GakuNin RDM. ...

Starting Alfresco Governance Services Community Edition

Starting Alfresco Governance Services Community Edition

Overview I attempted to install Alfresco Governance Services Community Edition, referring to the following manual, so here are my notes. https://support.hyland.com/r/Alfresco/Alfresco-Governance-Services-Community-Edition/23.4/Alfresco-Governance-Services-Community-Edition References As a similar effort, the following is available. Please refer to it as well. https://irisawadojo.blogspot.com/2020/11/72alfresco2.html Virtual Machine The following machine was created as an Azure virtual machine. Image: Ubuntu Server 24.04 LTS - Gen2 VM Architecture: x64 Size: Standard D2ads v6 (2 vcpus, 8 GiB memory) Open port 8080 for use. ...

Editing TEI/XML Files Using XSLT

Editing TEI/XML Files Using XSLT

Overview This article introduces one example of how to edit TEI/XML files while using XSLT. Related In the following article, I introduced how to preview XSLT results using a VSCode extension. In this article, I introduce a simpler method for editing TEI/XML files while using XSLT, without using the above extension. Installing Extensions Install the following extensions in VSCode: Live Server https://marketplace.visualstudio.com/items?itemName=ritwickdey.LiveServer Scholarly XML https://marketplace.visualstudio.com/items?itemName=raffazizzi.sxml Auto Close Tag https://marketplace.visualstudio.com/items?itemName=formulahendry.auto-close-tag Additionally, the following two extensions are recommended by Scholarly XML. However, since they were inconvenient in some of my use cases, I will make them optional for now. ...

Processing Dataverse Data with Archivematica

Processing Dataverse Data with Archivematica

Overview I confirmed the workflow for processing Dataverse data with Archivematica, so here are my notes. Background Archivematica provides a feature to input data from Dataverse. https://www.archivematica.org/en/docs/archivematica-1.17/user-manual/transfer/dataverse/ I learned about this feature at the following lecture, so I decided to try it out. https://www.kulib.kyoto-u.ac.jp/bulletin/1402322 Dataverse I used the Demo Dataverse that was also used in the following article. I uploaded the following data. https://demo.dataverse.org/dataset.xhtml?persistentId=doi:10.70122/FK2/IHQZL3 From here, download both the image data itself and the JSON data. Go to the Metadata tab and select JSON from Export Metadata. ...

Real-Time Preview of TEI/XML Using VSCode and XSLT

Real-Time Preview of TEI/XML Using VSCode and XSLT

Overview I prototyped a real-time preview environment for TEI/XML using VSCode and XSLT, so this is a memo of the process. Behavior An example of the operation is shown below. When you edit and save a TEI/XML file, the browser display is updated. https://youtu.be/ZParCRUc5AY?si=-aHHi3bIZGWoJYnP Preparation Install the following extensions: Live Server Trigger Task on Save When a TEI/XML file is saved, Trigger Task on Save executes the XSLT transformation, and the resulting HTML file is viewed with Live Server. ...

Creating PDFs from TEI/XML of the Koui Genji Monogatari Text Database

Creating PDFs from TEI/XML of the Koui Genji Monogatari Text Database

Overview The Koui Genji Monogatari (Collated Tale of Genji) Text Database publishes text data from “Koui Genji Monogatari.” https://kouigenjimonogatari.github.io/ This time, I added PDF files like the following to the database. https://kouigenjimonogatari.github.io/output/01/main.pdf This article describes how to create such PDF files using XSLT and TeX. Cloning the Repository Clone the repository as follows. git clone --depth 1 https://github.com/kouigenjimonogatari/kouigenjimonogatari.github.io Then install xslt3 with the following command. npm i xslt3 https://www.npmjs.com/package/xslt3 Creating the XSL File This time, we first convert the TEI/XML file to a TeX file. ...

Trying Local Authentication with @sidebase/nuxt-auth

Trying Local Authentication with @sidebase/nuxt-auth

Overview I had the opportunity to try local authentication with @sidebase/nuxt-auth, so this is a personal note for future reference. Background In the following article, I introduced how to perform Drupal authentication using @sidebase/nuxt-auth. In that article, I was using Nuxt 3’s SSR with the authjs provider of @sidebase/nuxt-auth. The provider descriptions are as follows. authjs: for non-static apps that want to use Auth.js / NextAuth.js to offer the reliability & convenience of a 23k star library to the Nuxt 3 ecosystem with a native developer experience (DX) local: for static pages that rely on an external backend with a credential flow for authentication. The Local Provider also supports refresh tokens since v0.9.0. Read more here. ...