« first day (132 days earlier)      last day (876 days later) » 

1:01 AM
@RM So, I guess that means we won't have anything edited from now on, as you've achieved your goal.
 
R.M
@rcollyer I got electorate 3 months ago, but haven't stopped voting :)
@acl (and to all) thanks :)
@rcollyer I might slow down though... the whole posting, editing, voting, reviewing, closing, etc. routine is tiring. Not ruling out a short hiatus (maybe after 20k)
 
1:28 AM
Damn, the blog proposal is getting interesting!!
I look forward to reading most of the ideas suggested
 
1:43 AM
@RM I haven't stopped voting, too, but I've cut back. Others can run the economy for a little bit. :P
@Rojo I second that.
 
 
2 hours later…
JxB
3:55 AM
Hi
 
@JxB Hi
 
JxB
Anyone know of a question addressing being able to overwrite a single byte in the middle of a LARGE binary file with Mma? Supposing the file is too large to import directly? I tried SetStreamPosition on a file I opened with OpenWrite[], but got an error.
 
@JxB I (kind of) remember one posted a few days ago
let me see
 
JxB
The only thing I can think of is to open the file twice, once as read-only, once as write-only, with two streams, and write the file in small chunks as I read it, filtering at the location I need to overwrite.
Would think an equivalent to matlab or idl's open in read-write mode would be available?
 
3
A: How to remove an expression from a file?

belisarius Functions like Read, Skip and Find usually operate on streams in an entirely sequential fashion. Each time one of the functions is called, the current point in the stream moves on. In a Sequential file you canĀ“t delete entries. The only option is shifting the "tail" of the file upwards.

 
JxB
4:01 AM
I.e., a file-copy...
 
errr yep
 
JxB
@belisarius Thanks, I'll take a look
 
there is another answer I did not read
@JxB And then there is Leonid's full blown filesystem ...
7
Q: Efficiently deleting rows in many large text files

Alexey PopkovI have 500 text files each of about 200000 rows. I need to delete one row in each of them as fast as possible (later such operations will repeat). What is the best way to do this with Mathematica? Solutions using NETLink, JLink etc. are welcome! Update: I have found a solution for C#: "Efficie...

But that could be an overkill for simple problems
 
JxB
@belisarius Yes, the filesystem looks interesting, but a bit more than I'm thinking of. I'll look into the Java random access functionality. Cheers.
 
@JxB cheers!
@JxB Are you still there?
 
JxB
4:35 AM
yep
 
JxB
4:55 AM
4
Q: Efficiently exporting many images as a video

AndrewI have many .gif images and I would like to export them as a single video file (I prefer .mov, but any video format is fine). But what if I have several tens of megabytes of .gif images? Is it possible to export them efficiently, without running out of memory? For example, suppose I have many ...

 
@JxB Regarding your Q about modifying a byte in a large file ... please consider doing that outside Mma
 
JxB
@belisarius I was trying to solve the above problem by exporting a small chunk of quicktime movie based on a few seconds of image files, then reading that movie, and splicing in extra image frames (picking them out of an ExportString[...,"QuickTime"]) to handle the remaining frames, reading them as needed to avoid the memory limitation. I got stuck when I had to overwrite the duration and size fields in the quicktime container...
Oh well :)
 
Well, having the better hammer does not help with a screw
 
JxB
This seemingly means that Mma cannot easily implement a disk-based Turing machine (one that reads a real "tape" and modifies it as it runs).
Not that one would need to...
 
I am sure one could extend the language to do that. It is just not trivial
 
JxB
5:14 AM
@belisarius Ahh, that's exactly the problem I was having. Yep, going outside Mma is a path of least dissipation.
 
or maximum entropy ... depends on the POV :D
 
JxB
haha. Do you have a physics background?
 
@JxB yeap. More underground than background by now, but yes.
 
5:30 AM
Is it possible to have the bounty awarded to an answer after the time to do so has expired? I was not aware of the time limit involved and this was my first time using the bounty system.
 
@StackExchanger I think it is not possible. Once it's gone, it's gone
 
@belisarius: Okay ... thanks for the info. Next time I'll try to act more quickly, although it does raise the question of what purpose such a short time limit serves in the first place.
 
@StackExchanger Just to prevent people gaming with the point system. Go and lurk into Meta SO and you will learn a lot about people's creativity to steal some rep points
 
@belisarius Okay ... good to know.
 
JxB
Later folks
 
6:12 AM
How do I put a Locator on an Image, and have it return pixel coordinates?
Is there a way without converting to Graphics first, or is there a very fast and convenient way to convert to graphics?
 
6:38 AM
What's a neat way of extracting the first, say, 5 elements of a list, or all of them if there aren't enough?
 
@Rojo Take[list, Min[Length[list], 5]] ... well, it's not really neat. Any ideas about the locator question? I think I'll ask it on main, it may be worth having as a question.
 
R.M
@Rojo Quiet@Check[list[[;; 5]], list, Part::take]?
 
@Szabolcs interfaces aren't my strong area, sorry
@Szabolcs, in fact, I look forward to your blog post on coordinate systems
 
6:53 AM
@RM BTW do you know what's the procedure for getting a blog? Is it something the moderators need to request?
 
R.M
@Szabolcs meta post and community interest is foremost...
beyond that, it's the usual 6-8 weeks...
 
Alright, will just wait then
So it looks like LocatorPane decides what coordinate system to use based on its content. For graphics, it's the plot coordinates. For images, it's pixel coordinates. For, say, a piece of text, it's from 0 to 1.
"qualibrate" is not en English word, is it?
And AGAIN: I Google for a solution, and what do I find? And old question of mine that I've forgotten about.
 
R.M
7:12 AM
@Szabolcs Something with Locator[MousePosition["Graphics"]] will work.
For example:
Dynamic@Column[{Graphics[{Raster@Reverse@ImageData@lena,
     Locator[MousePosition["Graphics", {0, 0}]]}],
   MousePosition["Graphics", {0, 0}]}]
Except that the locator is not constrained to the image dimensions... that can be fixed though
 
@RM Ah, so I need to look at MousePosition to discover the different coordinate systems the Locator can live in
 
R.M
@Szabolcs Probably simpler:
DynamicModule[{px = {0, 0}},
 Column[{
   	Graphics[{Raster@Reverse@ImageData@lena,
        Locator[Dynamic[px, (px = Round[#]) &]]}],
   	Dynamic@px
   }]
 ]
 
7:30 AM
What is the difference between ImageSubtract and ImageDifference?
It seems that when using ImageSubtract, 0.5 - 1 == 0 (and not -0.5)
And when using ImageDifference, 0.5 - 1 == 0.5 (still not -0.5)
 
R.M
ImageSubtractImage[ImageData[img1] - ImageData[img2]]
ImageDifferenceImage[Abs[ImageData[img1] - ImageData[img2]]]
 
@RM That is not entirely correct: it seems ImageSubtract will discard negative values, so it's more like Image[Clip[ImageData[img1] - ImageData[img2], {0,1}]]
I'm confused now, because:
Min@ImageData@ImageSubtract[img, 1] will usually give 0.
But ImageData@ImageSubtract[Image[{{-1, 0}, {0, 1}}], 0] will give {{-1., 0.}, {0., 1.}}.
 
R.M
@Szabolcs Ah, yes. It clips it too.
 
@RM Not in the last example though.
I think the key might be ImageType ...
If it's Byte, it must clip, but if it's Real, it can store negative values.
Yes, that's the explanation!
All I needed was to preserve negative values. It seems I can convert my image to use reals with Image[img, "Real"] first, then I can use ImageSubtract.
 
R.M
alright, I need to get some sleep... long day today.
g'night
 
7:40 AM
Night
 
Good night
 
8:07 AM
@acl I played with that a little bit, but even the matlab version is so painfully slow ...
@acl the 'Fattal' operator in the Luminance HDR program produces similar looking images
 
acl
@Szabolcs hi! (what a coincidence, I am normally working at this time but today had to take the morning off)
slow, yes, but it's so easy to experiment
I have not played with that program (I don't like HDR much so never got round to it)
 
@acl I tried it for the first time today, and I noticed that operator produced something very very similar.
(I took some photos yesterday)
 
acl
@Szabolcs I think the main point of the article though is the way of splitting the image, not the specific processing they do to those parts as an example. for instance, you could use it to emphasise different frequencies, making the image look "more 3d" or whatever
@Szabolcs so you are still on holidays?
 
8:24 AM
Something like that, involuntary holiday
 
acl
@Szabolcs one month long?
 
longer, until I can start a new 'job'
 
9:01 AM
@István see below
imageCrop[img_] :=
 DynamicModule[
  {a = {10, 10}, b = ImageDimensions[img] - {10, 10}},
  Graphics[
   {Raster[ImageData[img, "Real", DataReversed -> True]],
    {EdgeForm[Black], FaceForm[Opacity[0.25]],
     EventHandler[Dynamic[Rectangle[a, b]],
      "MouseClicked" :>
       If[CurrentValue["MouseClickCount"] == 2,
        Print[ImageTrim[img, Round[{a, b}]]]]]},
    Locator[Dynamic[a]], Locator[Dynamic[b]]},
   PlotRangePadding -> 0]]
 
9:40 AM
@Szabolcs Thanks Szabolcs, works like a charm!
Saved it to my custom controls folder
 
 
9 hours later…
6:33 PM
 
7:22 PM
@BrettChampion Would you answer it ... ? The question might be a bit controversial (people always say "disk space is cheap, get a bigger hdd") Actually I do wonder if the Windows-x86-64 directories from SystemFiles\Kernel can be deleted on a 32-bit system ... didn't someone once say here (don't remember who) that leaving out 64 bit components caused problem before (maybe in the previous home edition?)
@Brett Did you flag it?
 
 
2 hours later…
8:58 PM
hehe
 
acl
9:20 PM
@Verbeia you should ask for your rep to be frozen there...
 

« first day (132 days earlier)      last day (876 days later) »