Which letter of the English alphabet takes up most pixels?
Hmm, let's see:
Which Letter of the English Alphabet Takes Up Most PixelsWhich Letter of the English Alphabet Takes Up Most PixelsWhich Letter of the English Alphabet Takes Up Most PixelsWhich Letter of the English Alphabet Takes Up Most PixelsWhich Letter of the English Alphabet Takes Up Most Pixels
cccccccccccccccccccccccccccccccccccccccc
Related Topics
CSS Vertical-Align: Text-Bottom;
How to Create a "Tooltip Tail" Using Pure Css
How to Apply Box-Shadow on All Four Sides
Is It Possible in SASS to Inherit from a Class in Another File
Correct Use of Blockquote, Q and Cite
How to Create a Calc Mixin to Pass as an Expression to Generate Tags
User Agent Stylesheet Overriding My Table Style? Twitter Bootstrap
How to Make the New Long Shadow Trend with CSS
Differences Between Container, Row and Span in Bootstrap
How to Make Facebook Comments Widget a Fluid Width
CSS Fading Top and Bottom "Borders"
How to Remove Left Property When Position: Absolute
Capsule Shape Using Border-Radius Without a Set Width or Height
Placeholder Background/Image While Waiting for Full Image to Load
Related Topics
CSS Vertical-Align: Text-Bottom;
How to Create a "Tooltip Tail" Using Pure Css
How to Apply Box-Shadow on All Four Sides
Is It Possible in SASS to Inherit from a Class in Another File
Correct Use of Blockquote, Q and Cite
How to Create a Calc Mixin to Pass as an Expression to Generate Tags
User Agent Stylesheet Overriding My Table Style? Twitter Bootstrap
How to Make the New Long Shadow Trend with CSS
Differences Between Container, Row and Span in Bootstrap
How to Make Facebook Comments Widget a Fluid Width
CSS Fading Top and Bottom "Borders"
How to Remove Left Property When Position: Absolute
Capsule Shape Using Border-Radius Without a Set Width or Height
Placeholder Background/Image While Waiting for Full Image to Load
Related Topics
CSS Vertical-Align: Text-Bottom;
How to Create a "Tooltip Tail" Using Pure Css
How to Apply Box-Shadow on All Four Sides
Is It Possible in SASS to Inherit from a Class in Another File
Correct Use of Blockquote, Q and Cite
How to Create a Calc Mixin to Pass as an Expression to Generate Tags
User Agent Stylesheet Overriding My Table Style? Twitter Bootstrap
How to Make the New Long Shadow Trend with CSS
Differences Between Container, Row and Span in Bootstrap
How to Make Facebook Comments Widget a Fluid Width
CSS Fading Top and Bottom "Borders"
How to Remove Left Property When Position: Absolute
Capsule Shape Using Border-Radius Without a Set Width or Height
Placeholder Background/Image While Waiting for Full Image to Load
Related Topics
CSS Vertical-Align: Text-Bottom;
How to Create a "Tooltip Tail" Using Pure Css
How to Apply Box-Shadow on All Four Sides
Is It Possible in SASS to Inherit from a Class in Another File
Correct Use of Blockquote, Q and Cite
How to Create a Calc Mixin to Pass as an Expression to Generate Tags
User Agent Stylesheet Overriding My Table Style? Twitter Bootstrap
How to Make the New Long Shadow Trend with CSS
Differences Between Container, Row and Span in Bootstrap
How to Make Facebook Comments Widget a Fluid Width
CSS Fading Top and Bottom "Borders"
How to Remove Left Property When Position: Absolute
Capsule Shape Using Border-Radius Without a Set Width or Height
Placeholder Background/Image While Waiting for Full Image to Load
Related Topics
CSS Vertical-Align: Text-Bottom;
How to Create a "Tooltip Tail" Using Pure Css
How to Apply Box-Shadow on All Four Sides
Is It Possible in SASS to Inherit from a Class in Another File
Correct Use of Blockquote, Q and Cite
How to Create a Calc Mixin to Pass as an Expression to Generate Tags
User Agent Stylesheet Overriding My Table Style? Twitter Bootstrap
How to Make the New Long Shadow Trend with CSS
Differences Between Container, Row and Span in Bootstrap
How to Make Facebook Comments Widget a Fluid Width
CSS Fading Top and Bottom "Borders"
How to Remove Left Property When Position: Absolute
Capsule Shape Using Border-Radius Without a Set Width or Height
Placeholder Background/Image While Waiting for Full Image to Load
Which letter of the English alphabet takes up most pixels? Optimized OCR black/white pixel algorithm Set of unambiguous looking letters & numbers for user input Print aWhich letter of the English alphabet takes up most pixels? Optimized OCR black/white pixel algorithm Set of unambiguous looking letters & numbers for user input Print aWhich letter of the English alphabet takes up most pixels? Optimized OCR black/white pixel algorithm Set of unambiguous looking letters & numbers for user input Print aWhich letter of the English alphabet takes up most pixels? Optimized OCR black/white pixel algorithm Set of unambiguous looking letters & numbers for user input Print aWhich letter of the English alphabet takes up most pixels? Optimized OCR black/white pixel algorithm Set of unambiguous looking letters & numbers for user input Print a
ffffffffffffffffffffffffffffffffffffffff
gggggggggggggggggggggggggggggggggggggggg
hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj
kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
Hot Topics
Hot Topics
Hot Topics
Hot Topics
Hot Topics
mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm
nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn
oooooooooooooooooooooooooooooooooooooooo
pppppppppppppppppppppppppppppppppppppppp
qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq
rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
ssssssssssssssssssssssssssssssssssssssss
tttttttttttttttttttttttttttttttttttttttt
uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu
vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy
zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD
EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
GGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG
HHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH
IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII
JJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJ
KKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKK
LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL
MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN
OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO
PPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP
QQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQ
RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR
SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS
TTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT
UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU
VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV
WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY
ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ
W wins.
Of course, this is a silly empirical experiment. There is no single answer to which letter is widest. It depends on the font. So you'll have to do a similar empirical experiment to figure out the answer for your environment. But the fact is, most fonts follow the same conventions, and capital W will be the widest.
Gist with these character widths in a ratio form (W = 100) captured here using this particular example font:
https://gist.github.com/imaurer/d330e68e70180c985b380f25e195b90c
Optimized OCR black/white pixel algorithm
I don't have an answer, but here are some bounds on your eventual solution:
If you want a straight up "use X pixels as a key" then you'll need at least ceiling(log2(number of characters))
pixels. You won't be able to disambiguate letters with less bits. In your case, trying to find the 5 pixels is equivalent to finding 5 pixels that split the letters into independent partitions. It probably isn't that easy.
You can also use Moron's (heheh) suggestion and build a tree based on the letter frequencies of the language you are scanning similar to Huffman coding. That would take up more space than 5-bits per letter, but would probably be smaller assuming a power-law distribution of letter usage. I would go with this approach as it allows you to search for a specific partition for each node rather than searching for a set of partitions.
Set of unambiguous looking letters & numbers for user input
Mainly drawing inspiration from this ux thread, mentioned by @rwb,
- Several programs use similar things. The list in your post seems to be very similar to those used in these programs, and I think it should be enough for most purposes. You can add always add redundancy (error-correction) to "forgive" minor mistakes; this will require you to space-out your codes (see Hamming distance), though.
- No references as to particular method used in deriving the lists, except trial and error
with humans (which is great for non-ocr: your users are humans) - It may make sense to use character grouping (say, groups of 5) to increase context ("first character in the second of 5 groups")
- Ambiguity can be eliminated by using complete nouns (from a dictionary with few look-alikes; word-edit-distance may be useful here) instead of characters. People may confuse "1" with "i", but few will confuse "one" with "ice".
- Another option is to make your code into a (fake) word that can be read out loud. A markov model may help you there.
Print all possible combination of words of length 10 from a list letters with repeating 'A' exactly twice
The way to do it efficiently is to iterate over all combinations of the positions of the letters 'A', and for each such combination - iterate over all the ways other letters can be positioned, and just insert the 'A's there.
Be warned that with your inputs this will produce almost 3 million words!
On my machine it was printing the words for so long that I had to manually stop execution.
So here is the smaller example:
letters = ['A', 'b', 'c']
num_As = 2
num_total = 4
from itertools import combinations, product
for indices_A in combinations(range(num_total), num_As):
for rest in product(letters[1:], repeat=num_total - num_As):
rest = list(rest)
for index_A in indices_A:
rest.insert(index_A, 'A')
print(''.join(rest))
AAbb
AAbc
AAcb
AAcc
AbAb
AbAc
AcAb
AcAc
AbbA
AbcA
AcbA
AccA
bAAb
bAAc
cAAb
cAAc
bAbA
bAcA
cAbA
cAcA
bbAA
bcAA
cbAA
ccAA
Define a width for each words and compose a title automatically
Here is an implementation that finds the relevant grid size to apply. (and reruns the fitting code when resizing the browser so that it will work responsively)
function wordsinblocks(self) {
var demo = document.getElementById("demo"),
initialText = demo.textContent,
wordTags = initialText.split(" ").map(function(word){
return '<span class="word">' + word + '</span>';
});
demo.innerHTML = wordTags.join('');
self.disabled = true;
fitWords();
window.addEventListener('resize', fitWords);
}
function fitWords(){
var demo = document.getElementById("demo"),
width = demo.offsetWidth,
sizes = [10,30,50, 100],
calculated = sizes.map(function(size){return width*size/100}),
node,
i,
nodeWidth,
match,
index;
for (i=0;i<demo.childNodes.length;i++){
node = demo.childNodes[i];
node.classList.remove('size-1','size-2','size-3','size-4');
nodeWidth = node.clientWidth;
match = calculated.filter(function(grid){
return grid >= nodeWidth;
})[0];
index = calculated.indexOf(match);
node.classList.add( 'size-' + (index+1));
}
}
#demo{
display:block;
padding:0 0 0 1px;
overflow:auto;
}
#demo .word{
float:left;
box-sizing:border-box;
padding:5px;
border:1px solid #999;
}
#demo .size-1{width:10%}
#demo .size-2{width:30%}
#demo .size-3{width:50%}
#demo .size-4{width:100%}
<button onclick="wordsinblocks(this);">Design the sentence</button>
<p id="demo">Here is an amazing sentence well composed</p>
Related Topics
CSS Vertical-Align: Text-Bottom;
How to Create a "Tooltip Tail" Using Pure Css
How to Apply Box-Shadow on All Four Sides
Is It Possible in SASS to Inherit from a Class in Another File
Correct Use of Blockquote, Q and Cite
How to Create a Calc Mixin to Pass as an Expression to Generate Tags
User Agent Stylesheet Overriding My Table Style? Twitter Bootstrap
How to Make the New Long Shadow Trend with CSS
Differences Between Container, Row and Span in Bootstrap
How to Make Facebook Comments Widget a Fluid Width
CSS Fading Top and Bottom "Borders"
How to Remove Left Property When Position: Absolute
Capsule Shape Using Border-Radius Without a Set Width or Height
Placeholder Background/Image While Waiting for Full Image to Load