Notices


Reply
Thread Tools
amorek13's Avatar
Posts: 245 | Thanked: 32 times | Joined on Oct 2009 @ CT USA
#91
Simon hows mbarcode going?
 
Posts: 2,102 | Thanked: 1,309 times | Joined on Sep 2006
#92
Sorry guys, bit of a slow week as I'm teaching a course all week (plus trying to get a paper written).

Will do some more hacking at the weekend, promise!

To answer the questions:

1) Firstly, how the port to Qt going?
I've started writing the GUI, just pondering how to wrap all of the various parts of mbarcode in classes. I was also distracted by trying to bug fix the current mbarcode version's image file opening routine (stopped it crashing, but the data read in seems to just contain 0s).

2) I am curious how much mbarcode relies on zbar? It looks from a quick scan of the source that zbar is only used for the N900 - if true, why is that so? If zbar does all the barcode scanning and video streaming, then mbarcode's responsibility is displaying the UI, packaging it up into an app, and providing dbus messages, right?
zbar is used for both the Fremantle and Diablo builds. In the last version of zbar, there was no QR code functionality, and 1D barcode scanning was producing lots of false positives so I was using 1D from Batoo + the QR code written by derf/tteribe (which is now in zbar) + libdmtx.

Now that QR is integrated in ZBar, I'm using that for 1D + QR, and libdmtx for datamatrix (though I would like to add datamatrix functionality to ZBar, to make integration easier).

So no, unfortunately, as I need to pass the data to another decoder as well as ZBar, I therefore use a GStreamer pipeine to grab the data and then feed it to the libdmtx and ZBar decoders directly.

3) I have looked at zbar and can see that it has its own Qt widget - are you using that?
I've seen it, and iirc I updated the ZBar package in the repo to make this available for people to use if they want, but no I'm not using it nor can I (until datamatrix support is included in ZBar).

4) Do you have any plans to put mbarcode on gitorious and start accepting contributions? I would like to help out if I can.
It's in Garage SVN, so you're more than welcome to make contributions there. I've no opinion either way about moving to gitorious, is it much better? (and not too much work)

5) Finally, I can't find any info regarding the licensing for mbarcode - will it be GPL or LGPL or something else entirely?
GPL I imagine.
 
Posts: 2,102 | Thanked: 1,309 times | Joined on Sep 2006
#93
Lardman, I have an idea: we can install plugins through 2D barcodes. It's not so hard to code and it's quite useful
What do you mean by this?

Scan a 2D barcode and have it open the Application Manager? This is actually already included in the code (you can create a 2D barcode of an .install file and it will be sent to HAM once decoded; I'm not sure I got round to testing whether HAM actually opens the .install file mind you, another thing to check!). This is probably not the best plan, as the 2D barcodes become pretty large, it might just be a better bet to encode the URL to the .install file on downloads.maemo.org and have the browser download it and pass it to HAM.

Or did you mean something else completely?
 
Posts: 2,102 | Thanked: 1,309 times | Joined on Sep 2006
#94
It's in Garage SVN, so you're more than welcome to make contributions there.
Just in case you were wondering, the Garage project name is maemo-barcode, but as having "maemo" in an app name is frowned upon, the release packages are called mbarcode.
 
Posts: 2,102 | Thanked: 1,309 times | Joined on Sep 2006
#95
Not actually trying to bump my post count here, promise!

I should add that I still need to push the not-working-very-well patches that allow opening an image file to decode the barcode therein, plus the patches crashanddie sent me to remove warnings from decoder.c (thanks!).

I'm also looking at rather than using macro mode on the N900, just using the central portion of the image data (so you can hold it further away and it will focus better, but still not produce too large a frame to process).

I did look at this before, but then worked out how to use macro mode so left it alone (plus the gst crop element was missing from the repos), but I think it might be an improvement really so will have another look at how to get this working.
 
Posts: 7 | Thanked: 0 times | Joined on Nov 2009
#96
Hi lardman,

Thanks for answering my questions. I have been playing with zbar but I can't get zbarcam to work on the N900. When I run it I get the following error:

Nokia-N900-42-9:/home/user# zbarcam
ERROR: zbar processor in v4l2_nq():
system error: queuing video buffer (VIDIOC_QBUF): Input/output error (5)
Nokia-N900-42-9:/home/user# zbarcam -vvv
_zbar_video_open: opened camera device /dev/video0 (fd=5)
_zbar_v4l2_probe: omap3/et8ek8/ad5820/adp1653 on <unknown> driver omap3 (version 0.0.0)
_zbar_v4l2_probe: capabilities: CAPTURE STREAMING
v4l2_reset_crop: crop bounds: 1296 x 984 @ (0, 0)
v4l2_reset_crop: current crop win: 1296 x 984 @ (0, 0) aspect 1 / 1
v4l2_probe_formats: enumerating supported formats:
v4l2_probe_formats: [0] UYVY : UYVY, packed
v4l2_probe_formats: [1] YUYV : YUYV (YUV 4:2:2), packed
v4l2_probe_formats: [2] BA10 : Bayer10 (GrR/BGb)
v4l2_probe_formats: current format: YUYV(56595559) 1296 x 984 (line=0xa20 size=0x26f000)
_zbar_v4l2_probe: using I/O mode: USERPTR
_zbar_window_attach: falling back to XImage
_zbar_window_probe_ximage: [0] depth=1 bpp=1: not supported
_zbar_window_probe_ximage: [1] depth=4 bpp=8: not supported
_zbar_window_probe_ximage: [2] depth=8 bpp=8: no visuals
_zbar_window_probe_ximage: [3] depth=15 bpp=16: not supported
_zbar_window_probe_ximage: [4] depth=16 bpp=16: RGBP(50424752)
_zbar_window_probe_ximage: [5] depth=24 bpp=32: no visuals
_zbar_window_probe_ximage: [6] depth=32 bpp=32: BGR4(34524742)
proc_input_thread: spawned input thread
zbar_negotiate_format: YUYV(56595559) -> RGBP(50424752) (144)
zbar_negotiate_format: UYVY(59565955) -> RGBP(50424752) (144)
zbar_negotiate_format: setting best format YUYV(56595559) (144)
v4l2_set_format: set new format: YUYV(56595559) 1296 x 984 (0x26f000)
video_init_images: pre-allocated 4 USERPTR buffers size=0x9bc000
video_init_images: [00] @00000000
video_init_images: [01] @0026f000
video_init_images: [02] @004de000
video_init_images: [03] @0074d000
ERROR: zbar video in v4l2_nq():
system error: queuing video buffer (VIDIOC_QBUF): Input/output error (5)
x_handle_event: resized to 633 x 480
x_handle_event: resized to 800 x 424
ERROR: zbar processor in v4l2_nq():
system error: queuing video buffer (VIDIOC_QBUF): Input/output error (5)
Nokia-N900-42-9:/home/user#
I was hoping you could point me in the right direction here! I don't really understand what is going on!

Thanks in advance,
Paul D.
 
Posts: 2,102 | Thanked: 1,309 times | Joined on Sep 2006
#97
I'm afraid I have no idea, though you'll want to look at what's going wrong in v4l2_nq() obviously. You could always ask in #zbar?

I handle all the video stuff in GStreamer, then just pass a buffer of image data to ZBar via zbar_scan_image().
 
Posts: 13 | Thanked: 6 times | Joined on Nov 2009
#98
Originally Posted by lardman View Post
Or did you mean something else completely?
Yes, I did If you will add a Python-plugins, which is in fact just a big string, they can be compressed with zip or something similar, packed in 2D barcode (or you can pack an URL to a plugin), recognized by mbarcode, unpacked and installed directly inro mbarcode, without app manager.
Sorry for my bad english in this post, it's very late now and I can't check my spelling properly
 
qole's Avatar
Moderator | Posts: 7,109 | Thanked: 8,820 times | Joined on Oct 2007 @ Vancouver, BC, Canada
#99
Wow, pandaboom, what a great way to deliver a trojan directly to the phone, just by pointing the camera at a malicious barcode!
__________________
qole.org --- twitter --- Easy Debian wiki page
Please don't send me a private message, post to the appropriate thread.
Thank you all for your donations!
 
Posts: 402 | Thanked: 229 times | Joined on Nov 2009 @ Missouri, USA
#100
Originally Posted by qole View Post
Wow, pandaboom, what a great way to deliver a trojan directly to the phone, just by pointing the camera at a malicious barcode!
Um...are there any linux trojans running in the wild? According to google the last one was around 2003 or so....

Only way I could see this being a problem is if someone downloads something and hooks it up to a windows box or something.
 
Reply

Tags
barcode, camera, mbarcode

Thread Tools

 
Forum Jump


All times are GMT. The time now is 08:46.