Insert images as part of a QR code? [closed] - google-visualization

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 11 years ago.
I'd like to be able to generate custom QR codes that include image/logo designs as part of the actual QR code. Something like detailed here: http://mashable.com/2011/07/23/creative-qr-codes/
Where can I find guidelines on how I can manipulate the QR code that's generated for, say a URL, and still leave it 100% readable/scannable?
Steps of what I'd like to be able to do:
Generate QR Code for something, like a web address. (Already doing this with google charts)
Insert an graphic/image into the code itself, like a logo.
Scan it, and get the URL from step 1.

There are no hard and fast rules for what distortion will cause a scanner to fail. While the code itself is standardized, there are no standards for the algorithms that detect a code from an image, including handling real life distortion like perspective and lighting. Different hardware and software perform differently.
The image at the bottom of http://www.swetake.com/qr/qr1_en.html shows some of the "special" areas of code. It's best to leave those areas, all the black, white, and cyan areas, alone. There are additional reserved areas in all but the smallest codes. These show up first in the the lower right quadrant of the code but get repeated multiple times as the code gets larger. Those should also be left intact, particularly for smaller codes.
Changes to the remaining area can generally be corrected if sufficient error encoding is used when the code is created but, again, a lot depends on capture conditions. An unchanged code will always have the highest probability of decoding.

Related

Massively struggling with laying out DirectX and windows [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 9 years ago.
I have managed to get this example to work:
http://msdn.microsoft.com/en-us/library/windows/desktop/dd370994(v=vs.85).aspx
My problem is that I am trying to structure the code there into something more understandable...
My first step is to remove all the stuff that's not absolutely necessary to lanching a window with a direct x surface... but as soon as I start messing with the code, I get massively confused at which components are core, and which are not...
Do you know of a kind of boilerplate project with literally the utmost basics in it for a directx surface in a window.
D2D is fine unless you suggest I just code straight in D3D... even though i'm only going to be drawing 2d stuff.
I've read so many resources and tutorials for directX but every blooming one has different bits and bobs placed in and it's so difficult to just learn what the "must" bits are!...
Just to help you with the question.
I have started by trying to create a Gfx object that will start and create surfaces and resources for direct X, I also tried to separate my windows code but ofcourse got a bit lost there too... Finally I wrapped up my Game class so that the windows loop just ran begin draw, render and end draw. in the tutorial above you have 2 brushes which as i'm not familiar with directX, I'm unsure if I can just whip them out completely or what?
I guess a step in the right direction is really what i'm looking for.
I very strongly suggest that you get hold of a decent book that can guide you through the steps:
For example - try to get a copy of this

Drawing lines with boost::gil? [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
I need to draw some lines on an (off-screen) image. I'd like to use boost::gil because the lib is already integrated in my project.
I want to draw a line from start to end point in a 2dim array
Can anybody give me a quick example how to draw a line using gil?
Thank you.
GIL itself is very much concerned with storage of images and pixels in various formats and converting between them... but no more than that. user1929959's answer is using a GIL extension which facilitates interoperability of GIL with OpenCV and then uses OpenCV's line drawing (but OpenCV doesn't come with boost so you'd need to add that into your project too).
For high quality antialiased line drawing AGG and Cairo might also be worth considering (although you'd need to figure out how best adapt GIL images to their own image buffer types). But if you just want basic one pixel wide lines, consult any basic computer graphics text for some Bresenham's line algorithm pseudocode which could be trivially implemented using pixel-setting.
First take a look on boost::gil tutorial. You can find an example in drawing test, from where can easily extract method to drawing line.

Matching melodies [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
I'm trying to figure out an approach to compare two melodies to see how similar they are. Timbre doesn't matter. So if I had two recordings, one of a flute playing Happy Birthday and one of a Trumpet playing the same thing at the same pitches and tempo, it should consider them a match.
Is there a .NET or C++ library that can do this? If not, can someone give me an idea of what techniques I would need to do something like this?
Aubio has a C++ interface and several methods for performing pitch detection.
Since you are assuring that pitch and tempo will be the same and you seem to be ruling out harmonies, you can measure pitch over time and compare the two results.
Your comparison algorithm will require trial-and-error refinement. Keep in mind:
noise, timbre, and volume fluctuations can make the pitch at any moment a subjective topic
real-world performers can have similar pitch and tempo, but it's unlikely that they'll be perfectly the same.
The two songs may not start at the same moment in the recording.

test/training effect on classifers results [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
im struggling to understand the effect of training/test data's effect on my correctly classified instances result.
An example with naive bayes if i apply more test data in percentage split the algorithm becomes more reliable?
The point of splitting your entire data set into training and test is that the model you want to learn (naive Bayes or otherwise) should reflect the true relationship between cause and effect (features and prediction) and not simply the data. For example, you can always fit a curve perfectly to a number of data points, but doing that will likely make it useless for the prediction you were trying to make.
By using a separate test set, the learned model is tested on unseen data. Ideally, the error (or whatever you're measuring) on training and test set would be about the same, suggesting that your model is reasonably general and not overfit to the training data.
If in your case decreasing the size of the training set increases performance on the test set, it suggests that the learned model is too specific and cannot be generalised. Instead of changing the training/test split, you should tweak the parameters of your learner however. You might also want to consider using cross validation instead of a simple training/test split as it will provide more reliable performance estimates.

Graph editor on Qt [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
I'm writing a graph editor now. The programs must be written on Qt, but the problem is that I don't have enough experience with Qt, but I'm little experienced with C++. Last weeks I read one book about Qt, but I've read about 100 pages, so I know only some basics.
Can somebody give me advices about what classes should I use, please?
What I've already done:
I filled menubar with menus File, Algorithms, About etc.
I suppose that graph vertexes etc I should draw on QGraphicsView, so I added it too, also I add QGraphicsScene and bind them together (ui->setScene(scene)).
Sorry for my mistakes, unfortunately I don't have a complete understanding about all these things.
Also I added QGraphicsRectItem with scene->addRect() and set the flag moveable. But I don't know what classes should I have to use.
So, in general I want to understand how to do next things:
I want to add a panel with 2 buttons (vertex, line). After I chose vertex button (or what it will be) and click on the QGraphicsView - vertex should appear at that point. Also I must be able to change vertex name
After I chose line mode (link, which connected 2 vertexes) I should be able to connect 2 vertexes together depending on graph type (oriented or not).
By clicking on link between vertexes I should be able to change the weight of link.
I think it would be enough for one question.
Sorry if the question is very simple or stupid.
Thanks.
Your question is rather broad so it's nearly impossible to answer it entirely. So instead, I'll offer a really good example you might go look at. This example does much of what you want and might be a good starting set of code to both look at as well as reuse.