decoding

QR Codes Recognition Algorithm [closed]

不羁的心 提交于 2019-11-28 04:15:43
问题 I need to develop an application which detects QR codes with Visual Studio 2010 and OpenCV. I am very new in this topic. Can someone explain in simple words the steps of the decode algorithm and the procedure to detect the patterns in a QR code? I have read the steps in the ISO/IEC 18004:2000 document but I don't understand well. Thanks in advance 来源: https://stackoverflow.com/questions/6911953/qr-codes-recognition-algorithm

Unbaking mojibake

旧巷老猫 提交于 2019-11-28 02:06:38
问题 When you have incorrectly decoded characters, how can you identify likely candidates for the original string? Ä×èÈÄÄî▒è¤ô_üiâAâjâüâpâXüj_10òb.png I know for a fact that this image filename should have been some Japanese characters. But with various guesses at urllib quoting/unquoting, encode and decode iso8859-1, utf8, I haven't been able to unmunge and get the original filename. Is the corruption reversible? 回答1: You could use chardet (install with pip): import chardet your_str = "Ä×èÈÄÄî▒è

Decoding URI query string in Java

和自甴很熟 提交于 2019-11-27 20:06:29
I need to decode a URI that contains a query string; expected input/output behavior is something like the following: abstract class URIParser { /** example input: * something?alias=pos&FirstName=Foo+A%26B%3DC&LastName=Bar */ URIParser(String input) { ... } /** should return "something" for the example input */ public String getPath(); /** should return a map * {alias: "pos", FirstName: "Foo+A&B=C", LastName: "Bar"} */ public Map<String,String> getQuery(); } I've tried using java.net.URI , but it seems to decode the query string so in the above example I'm left with "alias=pos&FirstName=Foo+A&B

Detect if a file is an MP3 file?

微笑、不失礼 提交于 2019-11-27 14:06:50
问题 I'm writing a C++ library for decoding and encoding audio between different formats/codecs. I have a routine for quickly detecting the format before loading the required codec library. For WAV files one can simple look for the ASCII values "RIFF" and "WAVE" at the start of the file. The same applies to FLAC, we can simply read in the first 4 bytes, which will be "fLaC". But how can I quickly detect if a file is MP3? I can't rely on the file extension. I also can't try to decode the first MP3

Android byte[] to image in Camera.onPreviewFrame

六月ゝ 毕业季﹏ 提交于 2019-11-27 11:58:40
When trying to convert the byte[] of Camera.onPreviewFrame to Bitamp using BitmapFactory.decodeByteArray gives me an error SkImageDecoder::Factory returned null Following is my code: public void onPreviewFrame(byte[] data, Camera camera) { Bitmap bmp=BitmapFactory.decodeByteArray(data, 0, data.length); } This has been hard to find! But since API 8, there is a YuvImage class in android.graphics. It's not an Image descendent, so all you can do with it is save it to Jpeg, but you could save it to memory stream and then load into Bitmap Image if that's what you need. import android.graphics

How do I decode mail header strings with their encoding type in them in PHP

社会主义新天地 提交于 2019-11-27 07:22:56
问题 I'm creating a small, web based, mail client in PHP and noticed that a number of email Subjects and Contents appear as follows: =?ISO-8859-1?Q?Everything_for_=A35_-_Box_Sets,_Games_?= =?ISO-8859-1?Q?and_CD_Soundtracks...hurry,_ends_soon?= =?utf-8?B?UGxheS5jb206IE9uZSBEYXkgT25seSDigJMgT3V0IG9mIHRoaXMgV29ybGQgRGVhbHMh?= =?windows-1252?Q?Jon,_delivery_on_us_&_earn_=A35_credit_or_50_prints?= Does anyone have any ideas for decoding them so they display correctly? 回答1: This is an RFC 2047 encoded

base64 encoding that doesn't use “+/=” (plus or equals) characters?

落爺英雄遲暮 提交于 2019-11-27 06:44:48
问题 I need to encode a string of about 1000 characters that can be any byte value (00-FF). I don't want to use Hex because it's not dense enough. the problem with base64 as I understand it is that it includes + / and = which are characters I can not tolerate in my application. Any suggestions? 回答1: As Ciaran says, base64 isn't terribly hard to implement - but you may want to have a look for existing libraries which allow you to specify a custom set of characters to use. I'm pretty sure there are

How to decode some number into timeDate?

馋奶兔 提交于 2019-11-27 06:23:10
问题 This question is sequel of this one. So any idea how to decode this number 5252235562500 into date and time 19.11.2010 15:43 ? I have more pairs like this and I'm thinking about some script for comparing them to find some patern. Any advice what to check and how to search for patterns ? EDIT: I added four pairs that I curentlly have. 11.11.2010 16:23 > 5252425372575 16.11.2010 15:30 > 5252922462564 19.11.2010 15:39 > 5252231562511 19.11.2010 15:43 > 5252235562500 回答1: I think I found the

Decoding Raw H264 stream in android?

喜你入骨 提交于 2019-11-27 06:03:13
I have a project where I have been asked to display a video stream in android, the stream is raw H.264 and I am connecting to a server and will receive a byte stream from the server. Basically I'm wondering is there a way to send raw bytes to a decoder in android and display it on a surface? I have been successful in decoding H264 wrapped in an mp4 container using the new MediaCodec and MediaExtractor API in android 4.1, unfortunately I have not found a way to decode a raw H264 file or stream using these API's. I understand that one way is to compile and use FFmpeg but I'd rather use a built

md5 decoding. How they do it?

自作多情 提交于 2019-11-27 02:05:55
i thought, that it is impossible to decode md5 hashes, but i found tools, which decode them here . but i have no idea, how they do it in such a short period of time(it takes about a second). Help me please to understand it. Thanks It doesn't decode an MD5 hash. It uses what's called a rainbow table ... That's why it's so important to use salted hashes instead of storing the hash directly... It is impossible to decode an MD5 hash as it is a one way algorithm, they will have a database of pre-calculated hashes and the string that was used to generate the hash and then perform a lookup. The web