« first day (144 days earlier)      last day (4805 days later) » 

8:29 AM
morning all!
 
sbi
@Tony Morning.
 
@sbi how are u today?
 
sbi
@Tony Under pressure to find an algorithm.
So we need to find out whether a scanned piece of paper is, essentially, blank. I understand that a good way to find out about this is by analyzing a curve over the amount of brightness values on the image. Does anyone of you have an idea how to go about getting such a curve? Do I scan each pixel, analyze its brightness, and store it? Likely not. Would I round the pixels' brightness to less values and only store those? How many? And how do I analyze that curve?
I would know how to do all this using pen and paper, but I have never done any image processing, so I'm way out of my depth when it comes to picking good algorithms to implement this.
 
8:45 AM
@sbi, i think you should have a look at OpenCV and see what algo's they use there
I seem to remember coming across an algo for analyzing pixel intensity
something with Haar Wavelets perhaps... lemme check
 
sbi
@Tony Can't use any external lib. We're supposed to add it to our own lib.
 
@sbi but sometimes a library can help you to get some more understanding on how to implement your own... 'learn by example' is what I'm thinking
AForge.net is for .NET, but you'll be able to find in there what they use prob
 
sbi
@Tony Yeah, IIUC, that histogram thing is what I'm after.
 
9:10 AM
@sbi Fourier Transforms can be used to analyze frequencies of a signal over a time domain...
 
@sbi What is the definition of essentially blank? An empty page with a single line that is 1 pixel wide, is essentially blank, or are you trying to determine whether a scanned paper (mostly greys) does not contain any drawing/letter?
 
hi all
 
sbi
@DavidRodríguezdribeas That's to be fleshed out using real data. What the PM wants is that, if humans think they could throw out a page because there's nothing on it, so should the algorithm do. Of course, this would require us finding staplers, holes from binding etc., but this would come later. First we need an algorithm that uses some threshold and finds out whether the page exceeds it or not. (In reality, I'd want to tile the page first, but let's skip over that.)
 
9:26 AM
does anyone know if there is an existing api for converting a double to a posix time ?
 
i have to do something like int b; b=rand()%100 +1 for(int i=0;i<=10;i++){if(b<=90&&b>=65)cout<<b;}....but it always start with the same of b..i want it should start with different value of b every time i execute my program
how can do this?
 
I get a double value from a date/time calculation in an oracle database, I need to convert that to a posix date time format
 
9:40 AM
@sbi I would use an algorithm to detect borders, and then analyze the result in that domain (unless soft color gradients may be considered something to keep).
There are different border detection algorithms, and I cannot recommend one (over 10 years since I have done image processing, and I did it only for few months)
 
sbi
@DavidRodríguezdribeas But what would the bring? A few specks of dust that's been on the scanner's glass will have a border in the same way a line of text has.
 
Some of the border detection algorithms deal with that by making small specs disappear (there is a value assigned to each point where the gradient of colors changes abruptly, that value of confidence raises if the points around --following some pattern-- are also borders, and decreases if the surrounding points are not considered valid borders)
I fail to recall the name of the algorithm, arg!
 
sbi
For something completely different: Is there a way to kill a program from the command line in Windows? Believe it or not, but the task manager has gone berserk, and I need to kill it. How do I do this without using the task manager?
That did it: taskkill /IM taskmgr.exe
@DavidRodríguezdribeas But that would only get me that there are edges, and leaves me out in the cold finding out whether they are relevant. I think in the end all I have to start from is statistics: Are there tiles on that page which have lots of non-monochrome stuff? If so, it might be something relevant. (Filter out punch holes, staplers etc.) If not, it's likely a blank page.
What I need is a way to gather those statistics. How would edge detection help me with that?
 
9:55 AM
not sure how edge detection can help you, but what about color distribution? or color intensity or change....
 
sbi
@Tony Yeah. Something like that, although I'm not really interested in colors, brightness should do. That's why I thought a histogram of brightness values would do.
 
if you know the color intensity of some pixel alpha in your image, you can compare that to other pixels and see if there is differences, then you set a threshold on what the allowed differences are.... if the threshold is too high, too frequently then you can assume that the page has different colors, therefore non blank
 
sbi
@Tony I'm currently looking at an algorithm that finds out if a page is (essentially) a bitonal image. It juggles with two thresholds, one for black and one for white, and tries to find out how many percent of an image's pixels are between those. That seems a pretty good starting point.
What I need to do then is use only one threshold, and detect how the percentage of pixels are darker than that. But this would only work when a) there's a sharp increase in that histogram's curve, and B) I put the threshold at that curve. SO I'm looking at dynamic threshold determination, or whatever that's called. Anyone out there in the know?
Oh, and have I said that this needs to be fast? We're talking processing tens (if not hundreds) of thousands of pages here. If detecting empty pages takes longer than a few seconds per page, customers would have to install extra hardware to do this or be significantly slower than their competitors.
Mhmm, now that I have refined the problem thus far (thanks to you guys for letting me run this by you), I should probably formulate a proper SO question. Would that be too general for SO?
 
@sbi perhaps you need to create a curve of your histogram and then differentiate that function to find the rate of change in your coloring.... this change can serve as a basis for a threshold... but I guess you'd need to have sampled some to see what kind of change's you are getting.... I'm no expert, I'm just telling you what I'm thinking
maybe something more for Computer Science Q&A site?
as it tends more towards that, in it's first phase....
 
10:30 AM
Thresholding is the simplest method of image segmentation. From a grayscale image, thresholding can be used to create binary images (Shapiro, et al. 2001:83). Method During the thresholding process, individual pixels in an image are marked as “object” pixels if their value is greater than some threshold value (assuming an object to be brighter than the background) and as “background” pixels otherwise. This convention is known as threshold above. Variants include threshold below, which is opposite of threshold above; threshold inside, where a pixel is labeled "object" if its value is be...
That is linear time in the number of pixels in the image. By performing a second pass, you can determine the actual values of the pixels that fall to the white/black side of the threshold and maybe use that information to further eliminate noise. But I still think that you will get more information from border detection.
 
sounds like what @sbi is looking for
 
sbi
@DavidRodríguezdribeas Yep, been there already. :)
 
anyone experience with oracle?
0
Q: Oracle Date time calculation in Query

TonyI am doing a query on an oracle database that does some date time calculations in the select statement and assigns the return value to an alias. The question I have is what type is this return value? (date or double)? How can I convert it to a posix_time used by the boost::date_time library? I...

 
@sbi once you have the borders, determining the relevance is rather simple: eliminate the ones that are single dots (noise), you can use shape recognition to locate staples (aprox. 2 small dark circles), and punch holes (circles with an approximate size and that happens close enough to the borders...
I did enjoy image processing :)
 
@Sbi So you want to get colour values that are between say zero and one, and want to find all the values that are between say 0.4 and 0.6? Normal thresholding will not do this, it will just push the values from one side up to a max. You basically need to loop through all the pixels and perform the check, and out put say a black and white image. black being the default pixel colour and setting them to white if they are between 0.4 and 0.6
 
11:02 AM
Hello David
 
11:34 AM
Note: when calling lua_yield(L) (from a lua CFunction) it is critically important that you DO return -1 from the CFunction().
otherwise you could spend, oh, 3 days trying to figure out why your coroutines are being partially garbage collected a tad too early
 
12:04 PM
@ChrisBecke Will try to remember that one
 
sbi
12:31 PM
@David, @thecoshman, @Tony: I was in a meeting. I'm going out for lunch now, but meanwhile (Hurray for taking your laptop to a meeting!) I have formulated my question:
0
Q: Detecting empty pages in scanned documents

sbiSo we need to detect whether an image, created by a scanner, represents an empty page. I'm way out of my depth when it comes to image processing, so I have to run this by the community. Here's what I have come up with so far: Empty pages can be glaringly white, gray recycled paper, or yellow...

 
2
A: Why does this code `misbehave`?

DeadMGThis is not undefined behaviour or a dupe of some i++ = ++i misery, because an overloaded operator is a function call and an implicit sequence point is introduced. However, it's my understanding that the order of evaluation in this context is undefined and the compiler is free to re-order this h...

argh, bunch of noobs spasming over the ++ and ignoring the custom types
 
@DeadMG, replace undefined by unspecified and we'll agree.
 
@thecoshman bitter, bitter experience :-/
 
Undefined means "anything can happen", unspecified "one of several possible behaviors is chosen, it isn't possible to know which beforehand -- it could depend from one execution to the other".
 
@sbi answered :D
lame, BURG/GRUB has gone an got it self confused. It won't let me select my windows OS
 
12:49 PM
anyone know when ubuntu >10.10 is supposed to be ready for download?
 
@ChrisBecke erm.. October, the clue is in the name. Think it is in alpha 3 atm
 
@ChrisBecke, sometimes in April.
 
Wait... 10.10 is out, you got me confused then,we are in 2011 ain't we :P
 
@thecoshman, ">" != ">="
 
ah, 28th
Not long now :D
oh April that is
 
1:06 PM
anyone used COM around here?
0
Q: OLE Date Time to Posix_time

Tonywhat's the best way, without using MS COM libs to convert OLE date time format to a posix_datetime used by boost? OLE date time is represented as a floating point number.

 
1:44 PM
can I declare a static with initializer list as such in a class header:
static int _afxMonthDays[13]={0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 365};
 
@Tony, you can't give an initializer for static class variables at their declaration in class excepted for const integral types. You have to define the other outside the class declaration, and to give the definition once (i.e. probably not in an header file).
 
static const char blah[] = "blah";
is the better form of
#define BLAH "blah"
right? static AND const both required to avoid one-definition rule errors?
 
@ChrisBecke, if you do that in multiple compilation unit, it is guarantee that the different blah have different address. If you use the macro, the compiler can share the litterals - unlikely if they are in different compilation unit, I agree. Tony's issue is slighly different, because he wrote "in a class header", I'm assuming that _afxMonthDays is a static member and a static member can be defined only once.
 
@AProgrammer yea it's in a class member
so I can't make this a class member then?
 
only if it's const
and even then, maybe not
 
2:00 PM
@Tony You can make anything a static member. What you can't is define it inside the class, excepted when the type is a const integral one.
 
Im sure that the storage of string literals is implementation defined. i.e. string literals are allowed to share the same address. e.g.
const char foo = "blah";
const char bar = "blah";
foo and bar can be the same, especially in GCC or MSVC where string rollup is enabled
 
@ChrisBecke,
const char foo* = "blah";
const char bar* = "blah";
they can be the same. In
const char foo[] = "blah";
const char bar[] = "blah";
they can not because they are arrays, not pointers...
 
immutable arrays
damn. cant fix my typo. pls add []'s
 
@ChrisBecke Doesn't matter for that (or I need a reference that it does).
 
@Tony, side comment: _afxMontDays is an awful name to have for a variable, if only because that identifier is reserved in the global namespace for the implementation
It can be correct, if used within any other namespace, but I would avoid it altogether
 
2:05 PM
@DavidRodríguezdribeas it was taken from someone else's code
which has this horrible function to convert OLE Automation date to tm struct dates....
 
@DavidRodríguezdribeas, _ + lowercase for member is the only exception to the "don't use initial _ nor double _ " rule that I accept to remember.
 
which I happen to need
 
@AProgrammer time to hit up the site outside. Because now that you phrase the distinction like that, I begin to doubt myself.
 
I use _ for all my members (private ones)
my last statement could be taken the wrong way, I apologize for that
 
someone else's code might be wrong :P.... as an example, Dinkumware implementors tried to use _Copy as an internal type in the VS2010 STL implementation only to find out that the identifier has been incorrectly used in ATL, and produced errors when some combinations of using namespace where used
 
2:08 PM
@DavidRodríguezdribeas not unlikely... want me to post that code?
so you can review it?
lol
 
@AProgrammer The rule states that __ and _X, where X is any upper case letter are reserved, then _x with x being any lower case letter is reserved only in the global namespace 17.6.4.3.2/1
 
there's some ugly code, that even has a goto statement in it
:(
I wanted to find a better way to do that, but I haven't so far, suggestions are welcome!
 
goto's are not evil, just easy to abuse and get it wrong
 
@DavidRodríguezdribeas I haven't found many cases in which they are truly justified....
 
0
Q: string literal uniqueness requirements.

Chris BeckeI've always understood that the storage of string literals is implementation defined, so the compiler is free to roll up multiple literals such that, given static const char* foo = "blah"; static const char* bar = "blah"; foo and bar can point to the same memory. However, I can't figure out if...

flame on :P
 
2:12 PM
@Tony poor mans exception handling in C (or C++ where exceptions are too costly)
 
@David, we agree. I just said that I refuse to remember that it is more widely applicable than to members (probably because I've worked with too much old code which allowed to choose between defining things in a namespace or globally).
 
ah. setjmp ftw
 
@DavidRodríguezdribeas yea perhaps then, but not justified in the code i posted
 
Try to remove it and see if it becomes easier to read or not... :)
I have not tried, so you might be right in that it can be removed without impacting readability
 
sbi
This is a dupe: stackoverflow.com/questions/5246777/how-to-use-extern-keyword. However, it doesn't seem to have generated enough interest to be closed. Can you guys look please at it?
@thecoshman Then which month is 10.13 scheduled for??
 
2:20 PM
@sbi ¬_¬
calendar over flow?
 
@sbi In most implementations Jan. 11
 
sbi
@AProgrammer A common workaround (if you need this to be in a header) is to put the static in a class template and use an instance of that as base class.
@DavidRodríguezdribeas Then I must have missed the correlation between 10.10 and Oct 2011.
 
@sbi closed
 
sbi
@AProgrammer But remember that this is only true for the global namespace...
@Tony Thanks!
 
http://msdn.microsoft.com/en-us/library/s0s0asdt.aspx
The thing to understand about string pooling is that it looks at (afaik) all the COMDATs in the linked product, and so can rollup "strings" where the strings are any sequence of bytes. Trivial functions can get rolled up such that multiple function symbols point to the same sequence of implementation bytes. In theory executable code might end up being "eliminated" and rolled into a string literal, if the string literal was stored in a compatible section, and happened to consist of the exact same byte sequence.
Is there really a rule that says &foo != &bar ?
 
2:26 PM
@DeadMG you might have an answer for this
0
Q: Modelling clothing in C++

WelshboyGents and Ladies, I'm looking to write a bit of software that will end up drawing a human frame (which can be configured with various parameters), and the plan is to have some sort of clothing placed on the dummy. I've looked at Blender, and OpenGL libraries as well as other rendering and physi...

 
no
 
Ah, 3d games have come so far:
http://www.theonion.com/articles/new-video-game-technology-finally-allows-rendering,6692/
 
@sbi I know, I've used it sometimes.
 
sbi
2:45 PM
@Nils Because in a chat room full of C++ programmers from around the world you have, at best, a one-in-a-million chance to have a fruitful discussion about politics. If you talk politics with your fellow-workers, the guy at the bar where you have a quiet drink after work, or the parents of your kid's friends from school, you have something in common with them - even if it's just the country you're living in. Here, what we have in common in C++, and even that's little commonality sometimes...
 
@sbi, updated my answer on your question. hope it helps
 
@ChrisBecke Is the MS compiler using COMDATs for constant static arrays? Even if they do, ISTR that they had bugs because they combined template instantiations which mustn't have the same address per the standard. So what a specific implementation does doesn't help to state if it is conformant or not.
 
I think the object identity rules trump duplicate string elimination. In a correct implementation &foo MUST not euqal &bar
 
@JohannesSchaublitb hello
 
sbi
2:59 PM
@thecoshman Thanks, that's a very valuable addition.
 
accepted? :P
 
sbi
@thecoshman No, I'd really like to have some more ideas.
 
bah! :P
 
sbi
@thecoshman Actually, I just thought I could disregard all deviations from the mean towards white, since I'm only interested in the dark stuff. What do you think?
 
hang on, mid game :P
 
sbi
3:02 PM
@thecoshman I'm not going anywhere soon. :)
Well, except if they throw another meeting meeting at me. I love those meetings where half a dozen developers spend two hours trying to figure out how to shave a man day off the schedule.
 
@sbi a meeting to shave off one man day?
 
does it take three days to sort out ?
 
I think it would be odd if all frequenters of this chat actually met up in real life....
 
would be awesome more like!
 
sbi
@Tony Well, I have been exaggerating slightly... :)
 
3:07 PM
Doubless someone would hit me. so no thanks :P
 
sbi
@thecoshman The joke in that was: 6 developers times two hours makes 1.5 man days.
 
@sbi oh ok
 
today I thought I lost my keybundle when I arrived at work
 
sbi
@JohannesSchaublitb So where did it go?
 
I had to drive back all the way and looked everywhere I have been during driving to work
 
3:08 PM
it would be cool for me to meet a C++ programmer in real life that has lots of experience
 
in the end I found it was still stuck in the lock
 
@JohannesSchaublitb that sucks
 
sbi
@JohannesSchaublitb "Driving"? Like "a car"? You had it dangling off your wrist which was outside the window?
 
no, train
i thought "oh no. I lost it in the train!". when i just forgot to pull it off from the lock lol
 
3:09 PM
that's funny
rofl
@JohannesSchaublitb what country are you in?
 
sbi
20 years ago a then friend of mine (I do have friends that go back >20 years, but not all of them stuck with me) developed the theory of that parallel universe where all the pens we lose in this one ultimately end up. There must be whole star systems made of ballpoints, others of felt pens... We then developed the idea further to other parallel universes for lost socks (imagine a whole system of left black socks!), coins...
 
@sbi I'd like to go to the one for the lost euro notes
preferably purple euro notes lol
 
Sounds like something from the Lexx TV series.
 
would there be a undefined behavior-verse?
 
@sbi That remind me a sifi story where lost objects really were send more or less temporarily in a parallel universe. I don't remember anything about the rest of the plot.
 
3:17 PM
@sbi right then!
 
sup guise
 
erm, yer the SD will tell you how different pixels are from the mean, so it will pick up on white pixels on a an average black. You could use the SD to then look fox pixels that are greater then this, and say you need more then X% to be greater then the SD for you to consider it be something special
Are you doing some sort of processing after wards @sbi, or do you just want to know if a page is blank or not?
 
sbi
When I was a teen I read a story where that female archaeologists disappeared without a plausible explanation, so her male colleague made a point of going through the very same motions as she did in trying to recreate the events. He succeeds, and disappears, too, and appears on a technological advanced planet without any inhabitants, except for his colleague.
They then find out that the original inhabitants had to leave their world due to some catastrophic event (I forgot about) a couple of thousand years ago. They emigrated to earth, taking with them the story of the paradise they had been
@thecoshman The non-blank pages are to be processed further, but the exact workflow is setup by our customers.
 
@Tony i'm in germany
 
so you just need to be able to tell if a page is blank or not. But their could be paper clips, staples and the like... Well, I am sure that SD is the way to go. Plus it only takes two for loops. A third one could be used to work out how many pixels are out beyond say 2 SDs from the mean. May be threshold this so you get a black and white image for where things are different from the mean by a 'significant' amount, then use a eroision filter to get rid of small areas of detail
You should probably check out openCV, a lot of these things are done for you
 
sbi
3:35 PM
Breaking news: HTML+CSS is Turing complete http://bit.ly/hQJfkC
@thecoshman As I wrote in my questions, paper clips, staples, holes from binding etc. will be taken care of later.
How would you compare the SD method to the histogram idea?
 
@sbi But my solution might return a page with just hols or staples as a page of interest
Histogram could tell you where regions of interest are, but you don't care WHERE stuff is, jsut that si stuff
Plus, what are you going to put into your histogram, normally is would be used to add up all the pixels of interest in each row or column
 
sbi
@thecoshman I think you misunderstood. The histogram would give the number of pixels that have a specific brightness
 
@sbi really?
 
but how do you know what brightness this needs to be? Like I have been learning with my project, you can't just set a value as it can always be different. with a mean and SD you can say that if is statistically different, then count it as bright
 
@Tony, on the home page of lambda-the-ultimate, so a good source.
 
sbi
3:42 PM
@thecoshman I am looking at a (working) algorithm that uses this method to find out if a grayscale image is bitonal. To do this it creates a histogram of all the pixels, with the brightness on the X axis and the number of pixels on the y axis. It then checks whether the resulting curve is, essentially, a bath tub. If so, it's bitonal.
 
oh I see. Could work well that method yes... be interesting to see a comparision of perfomance
 
sbi
Well, really it just checks that less than a certain percentage of pixels is between two thresholds.
 
@sbi
@sbi: that link is awesome
 
though I can't imagine implementing binary search in HTML+CSS....
 
sbi
The numbers are all summed up during a single pass on the image, with some rounding done for each pixel, and only one multiplication/division at the end. I suppose you can't get much faster than that.
 
3:46 PM
Depends how well it performs though as well
 
sbi
@thecoshman Yeah, of course. According to those who have worked with the existing algorithm to detect bitonal images, the problem is finding the right thresholds. I suppose it's the same with our current problem. This will depend a lot on the quality of the scanned image.
 
@sbi supervised learning?
 
Are you sure your images will always be bi-tonal?
 
sbi
@thecoshman No, they aren't. Usually they'll be greayscale images, but most pages will essentially be bitonal. Which is why I considered trying to find that one significant increase in the histogram's curve where the black text begins. If there's only one such sharp rise, it's either block on white text or lints and specks on the scanner or staples etc. Modulo the staples, this leaves text and dust, for which the percentage of brightness should be a good indication.
 
Smoothing it will really help with a lot noise, might get rid of things like stapples and no fluff at all
 
sbi
3:53 PM
@thecoshman But it will get rid of that one line of text at the top of the page, too, that's left over from the previous page.
 
it depends how heavily you blur the image
it will get rid of fluff and general noise, a scanner will never scan pure white, though you could thresh the image, so those near white and near black pixels become ture white/black
 
silly suggestion: what if you changed the contrast (put it higher) so black/white areas are really distinct?
motes of dust can be ruled out I think by the mere fact they will only be a very small percentage of black on a page that is actually blank
 
could try it, but it is another pass over all of the pixels
doing a histogram like @sbi is suggesting is just one pass over the image
@sbi Considering you want to be able to detect images as well, I do think my method will work. Any page that is not mostly just the average will be flagged. You histogram method will get stuck on an image, as their is a full range of pixels
For those case where the histogram can work it will be faster, but SD can be used for any page, thus you can just let it burn through all the pages you want.
 
sbi
4:15 PM
@Tony What this would do is to try to force my histogram curve into a bathtub shape. I'd rather do this on the curve, instead of actually changing the image, because manipulating the curve is cheaper.
 
You could use the histogram as a first pass
 
sbi
@thecoshman Supposedly, a photo will not have that one steep rise of the histogram curve, or if it has (like a badly overexposed B/W photo), it still has a considerable percentage of dark pixels.
 
it might not though, it could be a photo of a fairly light scene. Their will be a large amount of black yes, but then why not just count the pixels that are below a value?
 
sbi
4:30 PM
@thecoshman Actually, that's exactly what I want to do, only I need to find a threshold depending on the actual image. Hence the idea of looking at the histogram's curve.
 
if you grey scale an image, then just say if 25% of the pixels are between pure black and half grey, you have an interesting page
you just need to train how black is black, and how many black pixels make a page interesting
 
sbi
5:14 PM
@thecoshman No. The problem is that this might differ from page to page. It's makes a lot of a difference whether you have a real white page to start with or some recycling paper that the scanner didn't enhance. Which is why I think the threshold needs to be found depending on the paper.
 
I do think the best way to find this threshold is going to be through SD
 
sbi
@thecoshman I was just trying to look through your answer to make sense of that statement, but it escapes me. Sorry if you have explained that before (besides this discussion I'm trying to fix a bug in product A, adapt product B to changes in A which broke the build, and keep having meetings), but how would find the threshold using the SD?
 
6:02 PM
@Tony Meeting in real live... you mean without a keyboard and compiler to write code snippets?
 
sbi
@DavidRodríguezdribeas That's what laptops are for!
 
6:36 PM
@DavidRodríguezdribeas that's what I mean, without compiler and keyboard.... AFK
lol
 
Hello all
 
The chat almost never works at home anymore. This is a rare occasion.
 
7:06 PM
@FredOverflow hereby welcome on this rare occasion!
 
sbi
7:37 PM
3
Q: Having trouble to connect to the chat

sbiFor two days last week, I had trouble accessing the chat. The site either wouldn't load, or wouldn't load fully, or render awfully (see below), or I couldn't post messages... I only had trouble when doing so from work while it was fine from home, it was worse in the mornings (GMT+1) and better in...

 
8:29 PM
0
A: Having trouble to connect to the chat

FredOverflow Anyone else having trouble accessing the chat? For me, it's the other way around: I have constantly trouble at home, but never at work so far. Now that I think about it, I could just connect via VPN to my workplace... yup, it works :)

@sbi: You can delete the comment on the Java question now ;)
must be hickup
 
@sbi lets say you are working with grey scale pixels, 0 being pure black, 100 being pure white. For the mean, you get a value of say, 60, so a medium light grey. The SD might be something like 5. This means that 68% of the pixels are between 55 and 65. With some testing, you could find out what sort of values for the SD you get with sample 'blank' pages.
@Sbi you are looking for values that are black, as this are what are basically text, but your not going to find many pixels that are pure black, they will be around black. But how much can pixels deviate from pure black and still be considered black? one standard deviation is normally how much you would let pixels vary and still be considered black.
 
Finally I can join the chat, and you guys are talking about pixels?
;)
 
sbi
@FredOverflow Done. :)
@FredOverflow And me of all chatters, having to deal with image processing.
 
8:44 PM
Oh, people liked my cactus analogy :)
 
sbi
8:58 PM
@thecoshman I'm the first to admit that I suck both at math and image processing stuff. :( So I have to ask the obvious: If I essentially have a bitonal image, the SD will be big, because all the pixel are way off the median. However, if I essentially have a white page with some flyspeck on it, the mean will be far into the white, so the few black specks will again produce a big SD, no?
Oh, @James has dug through his mountain of mails!
 
@sbi 1,234 of them. Thankfully Outlook sorted and/or deleted most of them for me.
Nothing like coming back to work after vacation!
 
sbi
@JamesMcNellis Yeuch, Outlook. I should sue this here at work, but I flunked, and installed TB.
Anyway, you cam back, I'm leaving. It's passed 10pm here, and I really need to go home in order to be able to properly think tomorrow.
 
@sbi I don't mind it that much; I just can never remember what the shortcut is to search through a message (ctrl+f is to forward a message) and every time I try to reschedule a meeting I do it wrong.
Later!
 
sbi
Thanks to everyone who discussed my problem today, especially @thecoshman, who stuck with me until the bitter end.
See you!
 
9:21 PM
@sbi You still their bud?
Getting the SD is all about playing the numbers. Say you have 1000 pixels, and they are all white (say a value of 95 to 100), bar a few 'noise' pixels that are near black, (0 to 5) those few black pixels will not affect the mean that much, say only 1% noise, you would go from an average of about 97 to like 95, so your mean value will still be close to white. The SD will work in a similar way, most of the pixels will differ by like 2 or 3 colour tones, where as the 'noise' will differ by like 95
The SD is basically an average of difference from mean, so those few noise pixels with have a minimal affect on the SD, so it will still be like 3. You would then be able to say that 68% of the pixels are with in one SD of the mean, so 68% of the pixels are 94 to 100, which is what we are expecting for a white page.
wow, I'm 10% a trusted user :P what's trusted user let you do?
 

« first day (144 days earlier)      last day (4805 days later) »