Autofocus when scanning QR code - blackberry

I'm working on a BlackBerry app which will be used in cafes and restaurants, and one of the features is QR code scanning
Is there any way to make the camera autofocus the QR code?
Searching, I found FocusControl, which looks like the one I'm looking for. Unfortunately, it's only available since OS 5.0.
I wonder how to achieve the same thing on OS 4.5, 4.6, and 4.7.
Any suggestions?

You can't.
In OSs prior to 4.5, you can launch the native camera app and listen for recently created image files (FileSystemJournalListener). This way, if the BB has autofocus, the image has more definition.
However, there's no way to do this for every BB. Unless you apply some image algorithm of your own after taking the image.

Related

How to calculate VuMark width while uploading to Vuforia Target Manager?

I have been working on one Augmented Reality demo in which I am using Vuforia 7 SDK for my iOS App.I want to use VuMark as Target and for that I have one svg File with my VuMark Design.
Now, When I am uploadig this svg on Target Manager it shows processing for a while and then it ends with failed status.
I assume that there might be something wrong with width parameter or I might be doing it wrong.please help me if someone knows about it,Thanks.

Scan 2D barcode using ZBar scanner in iOS

How to scan a 2D barcode using ZBar library in iOS. Do I need to set a symbol type (like ZBAR_QRCODE) to scan the 2D barcodes? I had checked other questions related to scanning, but nothing gives a correct answer to 2D barcodes. Please anyone help me on this. Attached a 2D barcode image for reference.
Barcode you're trying to scan is PDF417. It looks like Zbar doesn't support it:
ZBar is an open source software suite for reading bar codes from various sources, such as video streams, image files and raw intensity sensors. It supports many popular symbologies (types of bar codes) including EAN-13/UPC-A, UPC-E, EAN-8, Code 128, Code 39, Interleaved 2 of 5 and QR Code.
I suggest you use some other library for scanning PDF417.
If you target iOS 7.0+, your simplest option is to use MTBBarcodeScanner, which is a neat wrapper around a built in AVFoundation framework.
If you target iOS 6.0 as well, or need a more robust solution (like for scanning US driver's licenses, or a solution which will work on Androids as well), try PDF417.mobi SDK.
You can easily try PDF417.mobi SDK if you use CocoaPods by running
pod try PPpdf417

How to extract colours from UIImage using Swift

I recently started to create an iOS version of my Android app and I've found myself struggling to find a method of extracting dominant colours from an image.
Over in Android there's a palette library provided by Google that allows you to do just that. (https://developer.android.com/reference/android/support/v7/graphics/Palette.html)
I'm can't seem to find any libraries that will allow me to that in iOS however.
It seems my friend use this library: https://github.com/pixelogik/ColorCube
Take a tour, it seems that they do what you are expected.

Can't access camera PhoneGap 3.3

The Problem
I'm attempting to build my first PhoneGap app for iOS. I am using version 3.3.x.
For whatever reason, I can't seem to get the Camera feature to work on my iPhone 5S (haven't tested any other devices).
What I've tried
I've installed the Camera Plugin
I've added the feature to the config.xml file on the platform/ios/www level.
I've tried using PhoneGap docs examples.
I've tried using other online examples.
I've tried buying the PhoneGap 3 book and going step-by-step through their method.
None of that seems to matter
What works
I've used a <input type="file" accept="image/*;capture=camera">, this works, but it's not really what I'm looking for. I'm trying to actually access the Camera API.
Geolocation plugin I've tried and it works fine.
Accessing external API's I have gotten to work.
What also doesn't work
Contacts Plugin also doesn't seem to be working with the examples on the PhoneGap Docs.
Possible Clues
I am running / building the app from within Xcode. I've also tried building using the Command-Line Tool but I'm not sure how to run it on my iPhone once it's been built through CLT. I don't know if this matters or not.
There seems to be a "lag" in launch time when I include any scripts associated with the Camera API.
Since I've used so many different code snippets from verified sources, I doubt it has to do with the js, html or css that I'm writing. I believe this to be a dependency issue, but I have no idea what it could be, and there's not much help out there for PhoneGap yet.
Any advice or suggestions would be greatly appreciated!

How turn off autofocus with CameraBridgeViewBase opencv4android

I'm developing an app for Android 4.2.2, and I want to turn off the autofocus. There is a way to do it if I'm using CameraBridgeViewBase?
The version of the opencv library is 2.4.5. The specific device in which that I want the app to work fine is Samsung Galaxy s3.
actually i can't present a working solution. But Moster posted a realy good solution for focus and flash here.
He created a class inherited from JavaCameraView and overload some initialization methods! I guess you just need to add a functionality for turning it off. Or you just fix it with type 3 (Camera.Parameters.FOCUS_MODE_FIXED).

Resources