Class QRCodeScanner
java.lang.Object
de.iip_ecosphere.platform.kiServices.functions.images.QRCodeScanner
Offers the functionality of reading in qr codes.
- Author:
- Alexander Weber, SSE
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static de.iip_ecosphere.platform.services.environment.ProcessSupport.ScriptOwnerwill probably not work on windows!(Set files location for windows, might be changed) Maybe different way to enable debug information instead of deleting/adding .withProcessCustomizer(ProcessSupport.INHERIT_IO);.private static String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringpythonFallbackQRDetection(String b64Image) Call for python fallback script.static StringreadQRCode(BufferedImage bufferedImage) Detects a QR code on bufferdImages.static StringreadQRCode(String b64image) Enables the QR code detection for base64 encoded images.
-
Field Details
-
resultScript
-
qrScriptOwner
private static de.iip_ecosphere.platform.services.environment.ProcessSupport.ScriptOwner qrScriptOwnerwill probably not work on windows!(Set files location for windows, might be changed) Maybe different way to enable debug information instead of deleting/adding .withProcessCustomizer(ProcessSupport.INHERIT_IO);.
-
-
Constructor Details
-
QRCodeScanner
public QRCodeScanner()
-
-
Method Details
-
readQRCode
Enables the QR code detection for base64 encoded images.- Parameters:
b64image- Image as base 64 encoded string.- Returns:
- the result of the QR scan.
- Throws:
IOException- When the conversion from String to image fails.
-
readQRCode
Detects a QR code on bufferdImages. Source: https://simplesolution.dev/java-read-qr-code-from-image-file-base64-zxing/- Parameters:
bufferedImage- a BufferdImage to read a QR code from.- Returns:
- The content of the QR code as a String. If nothing could be detected the String will be empty.
-
pythonFallbackQRDetection
Call for python fallback script. Shall retry the detection!- Parameters:
b64Image- The image.- Returns:
- The contents of the QR code as a String.
-