Coder Social home page Coder Social logo

Comments (6)

Lamelynx avatar Lamelynx commented on July 17, 2024

I have thought of implementing video selection from gallery/camera but not come around it yet. If you feel to take on the challenge you are welcome :-) .
Face recognition is a lot of work and I think it should be better to put it in a separate plugin.
What do you mean with "capture it to a window"?, please explain.
To read QR code you may use a modification of this (Godot Mono) script https://github.com/tavurth/godot-qr-scanner/blob/master/GodotQrScanner.cs

from godotgetimageplugin-android.

Swaraj-cs avatar Swaraj-cs commented on July 17, 2024

Hi, thank you for the info.

I meant like a node, Drag it anywhere and set its options. May be inside a TextureRect. Something like this?
funabab/godot-camera-plugin#4

Also can we expect an update with QR code scanner?
Can't find much options for Godot.

from godotgetimageplugin-android.

Lamelynx avatar Lamelynx commented on July 17, 2024

This plugin is not a camera application, it's request (through "intent") a image from the android system. Then the device open default application for the current intent. Therefore it's not possible to get a live camera directly into your application with this plugin.

To parse a QR code you could use something like this C# script (Godot-mono):
(have not tested it and most certainly does not work without any editing)

using Godot;
using System;

using ZXing;
using ZXing.QrCode;
using ZXing.QrCode.Internal;
using ZXing.Common;

public class QrParser : Node
{

	public void ParseQR(byte[] byteArray)
	{
		LuminanceSource source = new RGBLuminanceSource(
			byteArray,
			GetTexture().GetWidth(),
			GetTexture().GetHeight()
		);

		var binarizer = new HybridBinarizer(source);
		var binBitmap = new BinaryBitmap(binarizer);

		QRCodeReader qr = new QRCodeReader();

		Result str = qr.decode(binBitmap);

		GD.Print(str);
	}

}

Pass your image as bytearray to function "ParseQR()"

from godotgetimageplugin-android.

Swaraj-cs avatar Swaraj-cs commented on July 17, 2024

Hi, thank you so much for the response. But this will work only when we capture the image right? while scanning the Qrcode, it will not detect the code right? Hope you can add this in the plugin with the option to set the camera (front or back). Its the only available plugin for android now. It will be a great help as Godot is not providing android camera feature.

from godotgetimageplugin-android.

Lamelynx avatar Lamelynx commented on July 17, 2024

You can try this plugin (GodotUniversalIntentPlugin-Android) to read QR code.
It's a small "intent" wrapper for android devices.
Se the example code here.

from godotgetimageplugin-android.

Swaraj-cs avatar Swaraj-cs commented on July 17, 2024

Thank you so much. I will try this.

from godotgetimageplugin-android.

Related Issues (16)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.