Jump to content

Barcode scanning information


---
 Share

Recommended Posts

Someone mentioned barcode scanning today in a meeting.  Is there information on this somewhere or a python function/script to scan something that I can test out in the future?

Link to comment
Share on other sites

Hello,

You can use the built-in function to use the barcode to select the templates (works with KIOSK), or...you can use Python to take a picture (ex. from measurement) and read the position of qr/barcodes (Personally, I use the zxing library.).

Code example:

import gom
from PIL import Image, ImageDraw, ImageEnhance
import zxingcpp
import numpy as np

gom.interactive.automation.measure_at_selected_positions (measurements=[gom.app.project.measurement_series['Scan 1'].measurements['M1']])
mes_image = gom.app.project.measurement_series['Scan 1'].measurements['M1'].images['left camera'].data.rgb
data = np.array (mes_image[0])
result = zxingcpp.read_barcodes(data)
for code in result:
	print(code.text + ' ' +str(code.position))

 

2023-10-04 12_53_52-Script Editor - getimage.png

Link to comment
Share on other sites

Please sign in to view this username.

 

I don't quite understand what you are saying. Are you saying that you personally take a picture of your part or scanning area and there is a QR code in there where you capture the barcode?

 

If we go to barcodes we will be scanning a label on a bag. So I think we would want to use the built-in funciton. 

 

My question is where is the built-in function, I don't see it anywhere?

 

Thanks

Link to comment
Share on other sites

I guess I'm asking how to set up the functionality of a hand held scanner with python. I have the understanding of how to pull the embedded data from a qr code, but I'm more concerned with how to initialize the hand held scanner and if I should use anything inside GOM to do this or do it with simply python modules/libraries.

Link to comment
Share on other sites

Well, I noticed that I was thinking about something else 😉

 

"Built-in" function:

You can configure  Kiosk Interface to read barcodes with barcodes scanner, but this is limited to loading templates (by value from barcode).

I think it only works with ScanBox, and hand held scanner require another way.

 

Python-way:

Rather, all ATOS scanners allows to initialise and acquire images from measurements via a script. 

Link to comment
Share on other sites

 Share

×
×
  • Create New...