Image segmentation is a fundamental operation in computer vision, used to partition an image into meaningful regions according to various attributes or spatial relationships among pixels. This paper presents a novel quantum circuit for two-threshold image segmentation implemented in the Novel Enhanced Quantum Representation (NEQR) format. Threshold-based segmentation is particularly attractive for quantum implementation due to its conceptual simplicity and inherent parallelism, but existing approaches suffer from a critical correctness issue: quantum RESET operations are applied to auxiliary qubits that may become entangled with the image data register during the segmentation process. We demonstrate, both theoretically and experimentally, that such RESET operations implicitly perform a measurement that collapses the superposition of the entangled quantum state, leading to non-reproducible segmentation results across repeated executions. To address this limitation, we propose a seven-step quantum segmentation pipeline that explicitly preserves entanglement integrity by allocating dedicated auxiliary qubits for each comparison stage, thereby eliminating unsafe qubit reuse. The proposed circuit encodes pixel intensities using the NEQR representation, applies upper and lower threshold comparators in sequence, and integrates both comparison outcomes to classify pixels into three intensity regions. Experiments conducted on a Qiskit StatevectorSimulator demonstrate that the proposed design produces stable and reproducible segmentation results across all test images, in contrast to the inconsistent behaviour observed in prior work. For images requiring 33 qubits, simulations consumed up to 128 GB of RAM with a total execution time of approximately 27 h on an Intel® Xeon® Gold 6240 CPU @ 2.60 GHz. The proposed approach establishes a robust foundation for quantum image segmentation on future fault-tolerant hardware.
Image segmentation is a fundamental operation in computer vision, used to partition an image into meaningful regions according to various attributes or spatial relationships among pixels. This paper presents a novel quantum circuit for two-threshold image segmentation implemented in the Novel Enhanced Quantum Representation (NEQR) format. Threshold-based segmentation is particularly attractive for quantum implementation due to its conceptual simplicity and inherent parallelism, but existing approaches suffer from a critical correctness issue: quantum RESET operations are applied to auxiliary qubits that may become entangled with the image data register during the segmentation process. We demonstrate, both theoretically and experimentally, that such RESET operations implicitly perform a measurement that collapses the superposition of the entangled quantum state, leading to non-reproducible segmentation results across repeated executions. To address this limitation, we propose a seven-step quantum segmentation pipeline that explicitly preserves entanglement integrity by allocating dedicated auxiliary qubits for each comparison stage, thereby eliminating unsafe qubit reuse. The proposed circuit encodes pixel intensities using the NEQR representation, applies upper and lower threshold comparators in sequence, and integrates both comparison outcomes to classify pixels into three intensity regions. Experiments conducted on a Qiskit StatevectorSimulator demonstrate that the proposed design produces stable and reproducible segmentation results across all test images, in contrast to the inconsistent behaviour observed in prior work. For images requiring 33 qubits, simulations consumed up to 128 GB of RAM with a total execution time of approximately 27 h on an Intel® Xeon® Gold 6240 CPU @ 2.60 GHz. The proposed approach establishes a robust foundation for quantum image segmentation on future fault-tolerant hardware.
The classical image segmentation algorithm based on local adaptive threshold can effectively segment images with uneven illumination, but with the increase of the image data, the real-time problem gradually emerges. In this paper, a quantum segmentation algorithm based on local adaptive threshold for NEQR image is proposed, which can use quantum mechanism to simultaneously compute local thresholds for all pixels in a gray-scale image and quickly segment the image into a binary image. In addition, several quantum circuit units, including median calculation, quantum binarization, etc. are designed in detail, and then a complete quantum circuit is designed to segment NEQR images by using fewer qubits and quantum gates. For a [Formula: see text] image with [Formula: see text] gray-scale levels, the complexity of our algorithm can be reduced to O[Formula: see text], which is an exponential speedup compared to the classic counterparts. Finally, the experiment is conducted on IBM Q to show the feasibility of our algorithm in the noisy intermediate-scale quantum (NISQ) era.
This work introduces a novel quantum algorithm for gradient-based edge detection that operates entirely within the quantum circuit model. Grayscale images are encoded using the Novel Enhanced Quantum Representation (NEQR), allowing exact arithmetic on pixel intensities. Directional gradients are computed by generating superpositions of neighboring pixels via cyclic shift operations and performing subtraction with an exact quantum arithmetic circuit. To refine accuracy, we introduce a direction-aware shifting mechanism that aligns edges with the darker side of intensity transitions. Our novel Quantum Partitioning Algorithm enables efficient in-place thresholding of edge candidates. This work exhibits polynomial-time improvements and optimizes the ancilla count compared to previous NEQR-based quantum edge detection algorithms. These results demonstrate a resource-efficient and fully quantum approach to edge detection, highlighting a practical quantum advantage in image processing.
Abstract The intrinsic high parallelism and entanglement characteristics of quantum computing have made quantum image processing techniques a focus of great interest. One of the most widely used techniques in image processing is segmentation, which in one of their most basic forms can be carried out using thresholding algorithms. In this paper, a fault-tolerant quantum dual-threshold algorithm has been proposed. This algorithm has been built using only Clifford+T gates for compatibility with error detection and correction codes. Because fault-tolerant implementation of T gates has a much higher cost than other quantum gates, our focus has been on reducing the number of these gates. This has allowed adding noise tolerance, computational cost reduction, and fault tolerance to the state-of-the-art dual-threshold segmentation circuits. Since the dual-threshold image segmentation involves the comparison operation, as part of this work we have implemented two full comparator circuits. These circuits optimize the metrics T-count and T-depth with respect to the best circuit comparators currently available in the literature.
The main goal of this paper is to present a new way of processing a video file using a combination of multiple quantum methods. The design is built upon the novel enhanced quantum representation technique, NEQR, which is then expanded using ideas such as image segmentation, implemented with the help of one or multiple comparators, binarization and cycle shift. This approach allows us to process all frames in parallel according to the desired parameters-one or more thresholds. A demonstration circuit for the proposed design, using a couple of frames, that sums together all the concepts is implemented using the Python programming language and Qiskit open-source framework, made available by IBM. The circuits are analyzed in the experimental section, using the Simulator component and configured using the noise properties of real devices, where we present different relevant metrics obtained by processing the simulation results.
In the rapidly advancing field of image analysis and processing, accurately segmenting images into meaningful regions remains a critical challenge. Drawing from recent advancements in quantum computing and information theory, our research introduces an innovative approach to image segmentation. This work presents a novel multilevel segmentation method that utilizes a two-dimensional quantum image representation, offering a more sophisticated and efficient technique for image thresholding. In this framework, the image's 2D histogram is treated as a quantum system, with quantum Rényi entropy used to quantify the information contained within the image. To enhance segmentation quality, we first improve the contrast of the images by applying a new contrast enhancement algorithm before performing the segmentation. The resulting entropy-based fitness function is then optimized using Differential Evolution (DE) and Particle Swarm Optimization (PSO) algorithms to determine the optimal thresholding values. A comprehensive comparative analysis is conducted between the proposed quantum method and traditional classical approaches, evaluated on a set of benchmark images using nine metrics, including the Wilcoxon test for statistical significance. Experimental results demonstrate the effectiveness of the PSO optimizer, the superiority of the two-dimensional quantum image representation.
The Flexible Representation of Quantum Images (FRQI) is widely used for encoding images into normalized quantum states for secure processing. However, it suffers from high computational and qubit complexity, limiting its scalability. In addition, quantum comparator models, often employed for qubit comparison, remain vulnerable to geometric attacks such as scaling and rotation and require a slow embedding and extraction rate. To address these challenges, this paper proposes a novel quantum watermarking technique that integrates Quantum Image Representation (QIR) with the Novel Enhanced Quantum Representation (NEQR), offering improved efficiency, robustness, and security for quantum image processing (QIP). The proposed technique initiates watermark qubit (QB) generation by integrating pixel position bits (PPB) with an arithmetic average (AA)-based logic, implemented through a quantum circuit comprising reverse parallel adder (RPA), dividing-4 (D4) models, and controlled-NOT (CNOT) gates. For watermark embedding, the proposed circuit employs RPA, quantum equal (QE) models, CNOT gates, and Pauli-X gates, embedding the watermark via a least significant bit (LSB) strategy within the NEQR-encoded image. The extraction process mirrors the embedding architecture, utilizing reverse parallel subtractor (RPS), QE models, CNOT, and Pauli-X gates to ensure accurate watermark retrieval. Experimental results demonstrate high robustness by achieving the highest peak-signal-to-noise-ratio(PSNR) values of 59.97 decibels (dB) along with a structural similarity index matrix (SSIM) of 0.9999. The proposed framework is validated using IBM Qiskit-based quantum circuit simulation on classical computing hardware and is not intended to demonstrate fault-tolerant quantum hardware execution or provable quantum computational advantage. Rather, the work focuses on simulation-level reversible quantum-circuit modelling for secure image watermarking using NEQR-based image representation and quantum-compatible reversible logic structures. Furthermore, the proposed technique is subjected to a range of image processing attacks, quantum noise and decoherence to rigorously evaluate its resilience and performance. In addition, an AI-assisted attack classification module is incorporated to automatically identify the type of distortion applied to the attacked watermarked images. A lightweight Random Forest classifier is trained to classify different attack categories, including no attack, Gaussian noise, salt-and-pepper noise, median filtering, histogram equalization, JPEG compression, cropping, rotation, and text addition. The proposed AI-assisted module achieves an overall classification accuracy of 96.56%, demonstrating its effectiveness in automatic attack identification and further strengthening the applicability of the proposed quantum watermarking framework for secure image authentication. Resource analysis shows that the watermark generation circuit requires 354 QBs (including 320 for RPA, 10 for D4, and 24 for CNOT), while both embedding and extraction consume 400 QBs each. Theoretical evaluation and empirical validation confirm the technique’s effectiveness in preserving image integrity and confidentiality, establishing it as a viable approach for secure quantum image watermarking in real time applications.