Damaging QR Codes to Create Circles: Are Corners Necessary? - qr-code

I am trying to create a circular QR Code. I understand that the typical circular codes require customer readers (Facebook, Kik, TikTok, ShotCode, etc.), but I would like this code to be able to be read by standard devices (ex.: the built-in reader in iOS devices).
I have looked at a stack of reference materials, including:
How can I generate a circular qr-code like a messenger or a kik code?
Generate circular qr-code like a messenger or a kik code using Python
Generate QR codes missing the corner
I've also dug into the (really in-depth) tutorial at thonky.com, and tried to create my own:
From what I can tell, I've kept the finder patterns, the alignment pattern, the timing patterns, the separators, and the dark module intact (see details here). But still no love when I try to read it.
Admittedly, I've taken an existing code (it contains the URL 'https://www.stackoverflow.com') and just chopped off the corners to make it fit. So my assumption is that I've damaged the code enough that the error correction isn't working.
But, would this work at all anyway? If I figured out how to encode it correctly, would it work without the corners? Or is this a useless endeavor to start with?

There is a basic structure for QR codes with specific elements that take part in the decoding process. Some of them are the alignment, the timing pattern, and the finder pattern. One of the elements which seems to be missing is the quiet zone. It's used to separate the code from other objects and surrounds all the data including structuring elements in the code. Have a look on the outer side of codes here and notice the difference. Also, if you look at the points that represent your data cells, some of them partially exist. In other words, some half and quarter circles exist and others are unknown behind the outer frame of your code design. How would it be figured out if it's black or white to be used for decoding? This is the problem. Please check this image to see how data look missing when you crop it with the circle.
Also, if you use any regular QR coder reading application, you will notice that circular QR codes require custom readers. So, the answer to your question is yes. The corners are necessary if you don't use a custom reader and if data exists on them.
If you are interested in academic research details, see this. I hope my answer helps you. :)

Related

Functionality in QR code without a web server

The context of this problem is weird (a magic trick that occurred to me), so I will skip that explanation and go straight to the point.
What I want: a set of QR codes (it can be just 1, or 2 different ones, either way will work for me). These QR codes may be scanned with a regular smartphone QR scanner to show some kind of text. My initial idea was a simple HTML page with the message in plain text. The difficult part is this:
Whenever someone scans the QR for the first time, certain message is show. But the second time, another message is shown. If it's just one QR code, I would like it to follow that sequence (alternating between the two messages). If there are 2 QR codes, I would want the first one scanned to display the first message (always) and the second one scanned to show the second one (always); the first scanned QR would determine which message will be shown in each one. The scan of one QR by one cell should not affect the scan of another phone (their functionality flow is independent).
I got some limitations though:
It must work just with the QR scanner a regular Android smartphone has (don't want the person installing any app).
I would like avoiding having to pay a server to store a page that has the functionality. The ideal scenery is the QR behaving like this by itself (maybe containing the proper script inside the QR).
I know how to generate QR codes and how to store HTML code in them using data:text/html protocol. My problem is the design of this functionality. Is there a way I can embed that functionality into a QR code (or two) without it being an URL to a web that stores the functionality? If not, which is the easiest way to achieve this?
Any help will be appreciated, thanks in advance.

Need to outline several contiguous areas on map

I am working with maps that are based upon the lot and block survey system. So, for example, my house could be a parcel identified by block 34, lot 2. For every block, there are usually multiple lots and they are all within the same contiguous area. My users can query for block and lot, and the map will zoom in and display that exact block/lot and outline it. What they want to do is to show all lots for a specified block and draw an outline around the entire block.
I can use the JavaScript API and QueryTask execute() method to get all of the lots/features for a block. However, I do not know if there is a way to aggregate the feature data such that I can calculate and draw a border surrounding them all.
I have tried the executeForExtent() method and it works, but the extent, of course, is a rectangle, which means that while the outline will encompass all of the lots, the edges will have partials of other blocks and lots.
I know it's possible because I have seen it, but I do not have access to that code or the folks who developed it.
Does anybody know of a way to create an outline such as the one I'm describing?
TIA
I think you're looking for a way to calculate a convex hull which you can do with the geometry engine in the ArcGIS API for JavaScript. See https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-geometryEngine.html#convexHull
Update: or maybe better the union method as suggested by #cabesuon in a comment below. Same basic principle - use the GeometryEngine :)

How to generate PDF via IText Template

we want to realize the following:
Generate PDF with Template,which means set value in AcroFields
Create a big details table (structure of table is also in template). In this progress, the details will occupy more than one page.
If the detail table is on multi pages, the header of the table should be also on top of the new page.
We found some examples on following website:
http://kuujinbo.info/cs/itext_template1.aspx
http://kuujinbo.info/cs/itext_template2.aspx
But the details the founction is omitted there.
Add content; the code for _do_form_fields(), _get_transaction_details(), and _transaction_summary() are omitted, since they only return strings to add to ColumnText. ColumnText is smart; each call to Go() renders as much text that will fit on the current page and returns a status code that tells you: (1) how much text (to write) is remaining, and/or (2) how much space is still available on the page. On each iteration you add text to the current page, call ColumnText.HasMoreText() to inspect the status, and then Document.NewPage() if necessary.
Is there anyone who had same situation before? We are appreciated that you could offer some tips or suggestions.
Thank you.
best regards,
Cheng Gong
You are already making a mistake in the first step of your requirements.
You say "Generate PDF with Template,which means set value in AcroFields."
The first part is OK: you want to generate a PDF with a template. However, this doesn't mean setting values in AcroFields. That's only one option. It's the option you take if you consider PDF being the digital equivalent of paper. The form is static: every coordinate is fixed. You just fill out data at the appropriate places. If the data doesn't fit the designated areas, you're out of luck. I already referred to chapter 6 of my book in a comment. You can also see how AcroForms work in a longer tutorial: https://www.youtube.com/watch?v=6YwDME0Fl1c (This tutorial is almost completely dedicated to creating a report from a data set.)
Another way to create PDF from a template is by using the XML Forms Architecture. In this case (if you have a pure XFA form), your PDF is a container for XML. You can then inject XML data into this form and the form will adapt itself depending on the data. A one-page form can easily grow into a 20-page document when filled out. This is explained in this video: https://www.youtube.com/watch?v=h0wzj84tnmw (Note that the video dates from 2012. The product I present has been finished and the results are much better now.)
Alternatives to this approach could be to create a template in HTML. I often refer to this solution as a poor man's XFA solution. This solution requires XML Worker. You can see an example in this video: https://www.youtube.com/watch?v=clWoDrEEl50
This is a general answer. I couldn't be more specific because your question isn't clear. You first need to make your mind up regarding the approach. Right now, you talk about AcroFields and at the same time about ColumnText. In the long tutorial, this is described as the hard way. See also the corresponding online samples. It is very confusing why you're asking a very difficult question before asking the simple questions. Unless of course, you already have the answer to those simple questions. If so, please share these answers.

Which is broken: the DICOM or the converter?

I'm trying to convert a 4D DICOM image (x,y,z,time) to a different file format. Something goes wrong, because the output image has lost the time dimension.
I'm trying to decide whether:
the DICOM series is broken -- it's possible that a 3rd party, who anonymized data, removed critical information from the header; or
the conversion code is incomplete -- it simply can't handle this flavour of DICOM
The answer to this will determine whether I have to fix the DICOM, or fix the converter.
I've tried diving into the DICOM standard, to understand what specific header values mean, but I don't find this document helpful; it gives a mere word or two for each header field. I see fields in my data that look suspicious, but I don't know if it's actually wrong, or if I don't understand what it's supposed to be telling me.
I can think of several ways to answer my problem:
Are there any tools out there that can confidently classify a DICOM series as either valid or invalid?
Is there a document which describes precisely what each DICOM header value is supposed to contain?
Is there a better approach to figuring out which is broken -- the image, or the converter?
You are not looking at the right document, you should be looking at PS 3.3 - current. For example:
A.4.3 MR Image IOD Module Table
Or as someone mentioned in the comments use dciodvfy from dicom3tools package.

Get the next direction help provided GPS location

I am working on proof of concept project that is an augmented reality based navigation system. Basically, it is supposed to provide users a video of real scene with additional navigational signs that are created with the use of GPS location.
The thing I need to do is not a complete useful system but rather a proof of concept. There were mainly two tasks that I had to do. First real image of the scene is processed to determine the road in it, and with the use of GPS I will place the navigational sign like turn right, go straight on the road. The challenge I have here is how i can fetch the required navigation information. I considered Google Maps Api but it requires you to have your google host. I also made some research about how to get directions from it, but it seems that results are not very well structured for my purposes. I mean I need something like having a certain number of outputs and rigorously defined (e.g. turn right, turn left, etc) but its output is very unstructured. How do you think I can achieve this task. Thanks for any help.
This Link might help for Google Map Location extraction
https://developers.google.com/maps/documentation/javascript/streetview
You can use Layar , or other available AR sdks(Metaio, QUalcomm also provide one ) for AR related Overlays
Good luck !

Resources