You are hereFeed aggregator

# Feed aggregator

## Pre-order a signed first edition of Walkaway, which got a starred review in Booklist today!

Cory Doctorow - 2017, February 1 - 14:08

Here’s a reminder that you can pre-order a signed first edition hardcover of Walkaway, my first novel for adults since 2009, which William Gibson called “A wonderful novel” and Edward Snowden called “a reminder that the world we choose to build is the one we’ll inhabit” and Kim Stanley Robinson called “a utopia is both more thought-provoking and more fun than a dystopia” and Neal Stephenson called “the Bhagavad Gita of hacker/maker/burner/open source/git/gnu/wiki/99%/adjunct faculty/Anonymous/shareware/thingiverse/cypherpunk/LGTBQIA*/squatter/upcycling culture, zipped down into a pretty damned tight techno-thriller with a lot of sex in it.”

I signed 2,900 early copies of the first edition, and I’ll be visiting 20 US cities as well as cities across Canada and the UK this spring to read from and discuss the book.

Happily, today’s Booklist contained a starred review by Regina Schroeder, who called it “memorable and engaging” and “ultimately suffused with hope.” This is the book’s second starred review — last December’s Kirkus reviews called it “A truly visionary techno-thriller that not only depicts how we might live tomorrow, but asks why we don’t already.”

The book drops on April 25, and I’m so damned excited I can barely contain myself!

Categories: Blogs

## The cover of this week’s Bookseller!

Cory Doctorow - 2017, January 31 - 07:56

Categories: Blogs

## Clarion Workshop now accepting applications for sf writers to learn with Lynda Barry, Nalo Hopkinson, CC Finlay…and me!

Cory Doctorow - 2017, January 30 - 06:53

The instructors for this summer’s Clarion Science Fiction and Fantasy writers’ workshop are Dan Chaon, Lynda Barry, Nalo Hopkinson, Andrea Hairston, Cory Doctorow, C.C. Finlay and Rae Carson: the workshop runs from Jun 25-Aug 5 at UCSD in La Jolla, California.

It’s an intensive, boot-camp style writing workshop that’s been running annually since 1968. New instructors rotate in every week and students write about one story every week, and learn to improve their work by critiquing one another’s stories and having their own work critiqued. Students meet one-on-one with each instructor and take part in special activities, exercises and challenges set by the instructors.

The “distinguished alumni” of the workshop include Ted Chiang, Bruce Sterling, Octavia Butler, James Patrick Kelly, Nalo Hopkinson, Kim Stanley Robinson, Kathe Koja, Eileen Gunn, Tobias Buckell, Gavin Grant, Richard Kadrey and many, many others.

I teach Clarion every two years or so, as part of my “paying forward” — my own Clarion experience in 1992 was absolutely transformative for my writing and my career.

Financial assistance is available.

Application – 2017 Clarion Workshop; Sunday, June 25, 2017 – Saturday, August 05, 2017 [The Clarion Foundation]

Categories: Blogs

## Gaussian filtering with imgaussfilt

Matlab Image processing blog - 2017, January 23 - 06:14

With the R2015a release a couple of years ago, the Image Processing Toolbox added the function imgaussfilt. This function performs 2-D Gaussian filtering on images. It features a heuristic that automatically switches between a spatial-domain implementation and a frequency-domain implementation.

I wanted to check out the heuristic and see how well it works on my own computer (a 2015 MacBook Pro).

You can use imgaussfilt this way:

rgb = imread('peppers.png'); sigma = 10; rgb_smoothed = imgaussfilt(rgb,sigma); imshow(rgb) imshow(rgb_smoothed) title('Gaussian smoothed, \sigma = 10')

With this call, imgaussfilt automatically chooses between a spatial-domain or a frequency-domain implementation. But you can also tell imgaussfilt which implementation to use.

rgb_smoothed_s = imgaussfilt(rgb,sigma,'FilterDomain','spatial'); rgb_smoothed_f = imgaussfilt(rgb,sigma,'FilterDomain','frequency');

I'll use this syntax, together with the timeit function, to get rough timing curves for the two implementation methods. The heuristic used by imgaussfilt uses a few different factors to decide, including image size, Gaussian kernel size, single or double precision, and the availability of processor-specific optimizations. For my computer, with a 2000-by-2000 image array, the cross-over point is at about $\sigma = 50$. That is, imgaussfilt uses the spatial-domain method for $\sigma < 50$, and it uses a frequency-domain method for $\sigma > 50$.

Let's check that out with a set of $\sigma$ values ranging from 5 to 200.

I = rand(2000,2000); ww = 5:5:200; for k = 1:length(ww) t_s(k) = timeit(@() imgaussfilt(I,ww(k),'FilterDomain','spatial')); end for k = 1:length(ww) t_f(k) = timeit(@() imgaussfilt(I,ww(k),'FilterDomain','frequency')); end plot(ww,t_s) hold on plot(ww,t_f) hold off legend('spatial','frequency') xlabel('\sigma') ylabel('time (s)') title('imgaussfilt - 2000x2000 image')

As you can see, the cross-over point of the timing curves is about the same as the threshold used by imgaussfilt. As computing hardware and optimized computation libraries evolve over time, though, the ideal cross-over point might change. The Image Processing Toolbox team will need to check this every few years and adjust the heuristic as needed.

\n'); d.write(code_string); // Add copyright line at the bottom if specified. if (copyright.length > 0) { d.writeln(''); d.writeln('%%'); if (copyright.length > 0) { d.writeln('% _' + copyright + '_'); } } d.write('\n'); d.title = title + ' (MATLAB code)'; d.close(); } -->

Get the MATLAB code (requires JavaScript)

Published with MATLAB® R2016b

. This function performs 2-D Gaussian filtering on % images. It features a heuristic that automatically switches % between a spatial-domain implementation and a frequency-domain % implementation. % % I wanted to check out the heuristic and see how well it works on % my own computer (a 2015 MacBook Pro). % % You can use |imgaussfilt| this way: rgb = imread('peppers.png'); sigma = 10; rgb_smoothed = imgaussfilt(rgb,sigma); imshow(rgb) %% imshow(rgb_smoothed) title('Gaussian smoothed, \sigma = 10') %% % With this call, |imgaussfilt| automatically chooses between a % spatial-domain or a frequency-domain implementation. But you can % also tell |imgaussfilt| which implementation to use. rgb_smoothed_s = imgaussfilt(rgb,sigma,'FilterDomain','spatial'); rgb_smoothed_f = imgaussfilt(rgb,sigma,'FilterDomain','frequency'); %% % I'll use this syntax, together with the |timeit| function, to get % rough timing curves for the two implementation methods. % The heuristic used by |imgaussfilt| uses a few different factors % to decide, including image size, Gaussian kernel size, single or % double precision, and the availability of processor-specific % optimizations. For my computer, with a 2000-by-2000 image array, % the cross-over point is at about $\sigma = 50$. That is, % |imgaussfilt| uses the spatial-domain method for $\sigma < 50$, % and it uses a frequency-domain method for $\sigma > 50$. % % Let's check that out with a set of $\sigma$ values ranging from 5 % to 200. I = rand(2000,2000); ww = 5:5:200; for k = 1:length(ww) t_s(k) = timeit(@() imgaussfilt(I,ww(k),'FilterDomain','spatial')); end for k = 1:length(ww) t_f(k) = timeit(@() imgaussfilt(I,ww(k),'FilterDomain','frequency')); end plot(ww,t_s) hold on plot(ww,t_f) hold off legend('spatial','frequency') xlabel('\sigma') ylabel('time (s)') title('imgaussfilt - 2000x2000 image') %% % As you can see, the cross-over point of the timing curves is about % the same as the threshold used by |imgaussfilt|. As computing % hardware and optimized computation libraries evolve over time, % though, the ideal cross-over point might change. The Image % Processing Toolbox team will need to check this every few years % and adjust the heuristic as needed. ##### SOURCE END ##### a8e0fa0a1801485fb08e2add318cf07e -->

Categories: Blogs

## Aliasing and image resizing – part 3

Matlab Image processing blog - 2017, January 16 - 09:29

Today I'll try to wrap up my discussion about how aliasing affects image resizing and about how the imresize function tries to prevent it. (This is called antialiasing.) Let me show you where we are going. Here is the zone plate image I showed last time.

Z = imzoneplate(501); imshow(Z) title('Z')

Here's what happens when we shrink Z by throwing away samples.

Z4 = Z(1:4:end,1:4:end); imshow(Z4) title('Z4')

And here's what imresize does (with the default behavior):

Z4_imresize = imresize(Z,0.25); imshow(Z4_imresize) title('imresize(Z,0.25)')

Before I get started describing the imresize approach to antialiasing, I should say that there are several algorithm approaches to antialiasing in image resizing. This is just one. It is based on classical ideas from digital signal processing.

I'll use the notation that $f[n]$ is a function of a discrete variable $n$, and $f(x)$ is a function of a continuous variable $x$. Here's a way to think about the image resizing problem that is theoretically useful. To simplify the discussion for a bit, I'll talk in terms of 1-D signals. (Warning: people with a graduate-level background in digital signal processing will probably find this explanation too hand-wavy. Everybody else will find it too jargon-y. I'm doing my best.)

Suppose we want to convert a 1-D signal, $f[n]$, to another 1-D signal that has a different sampling rate.

1. Convert the discrete-domain signal, $f[n]$, to a continuous-domain signal, $f(x)$. Theoretically, this step involves the use of a continuous-domain filter, $h(x)$. You can think of this step as a form of interpolation (for some choices of $h(x)$, anyway).
2. Convert the continuous-domain signal, $f(x)$, to a new discrete-domain signal, $g[n]$, by sampling $f(x)$ at the desired rate: $g[n] = f(nT)$.

There's a problem with the two-step procedure above. If the sampling rate for $g[n]$ is reduced from the original sampling rate of $f[n]$, then the procedure is susceptible to aliasing distortion if $f[n]$ contains high frequencies that cannot be represented at the lower sampling rate. To address this problem, let's insert another step in the procedure.

1. Convert the discrete-domain signal, $f[n]$, to a continuous-domain signal, $f(x)$.
2. Pass $f(x)$ through a lowpass filter to remove high-frequency components that would cause aliasing distortion at the desired sampling rate. Let's call this filter $h_a(x)$.
3. Convert the continuous-domain signal, $f(x)$, to a new discrete-domain signal, $g[n]$, by sampling $f(x)$ at the desired rate: $g[n] = f(nT)$.

One key to understanding the imresize approach is to recognize that filtering with two filters in succession, in this case $h(x)$ and $h_a(x)$, can be replaced by one filter whose frequency response is the product of the original two filters. The second key to understanding the imresize algorithm is that the desired frequency response for the antialiasing filter, $h_a(x)$, depends how much we are changing the sampling rate. If we shrink the original signal more, then we have to remove more of the high frequencies with $h_a(x)$.

To state that more compactly (while waving my hands fairly vigorously), you can use just one continuous-domain filter to simultaneously accomplish interpolation and antialiasing.

Let me show you how this works for the cubic interpolation kernel that imresize uses by default. Here is the code for the cubic interpolation kernel:

function f = cubic(x) % See Keys, "Cubic Convolution Interpolation for Digital Image % Processing," IEEE Transactions on Acoustics, Speech, and Signal % Processing, Vol. ASSP-29, No. 6, December 1981, p. 1155.absx = abs(x); absx2 = absx.^2; absx3 = absx.^3;f = (1.5*absx3 - 2.5*absx2 + 1) .* (absx <= 1) + ... (-0.5*absx3 + 2.5*absx2 - 4*absx + 2) .* ... ((1 < absx) & (absx <= 2));

(This code is inside the file imresize.m.) And here's what the interpolation kernel looks like:

figure fplot(@cubic,[-2.5 2.5],'LineWidth',2.0)

The function imresize then modifies the interpolation by stretching it out. The stretch factor depends directly how much we are shrinking the original signal. Here's the imresize code that modifies the interpolation kernel:

if (scale < 1) && (antialiasing) % Use a modified kernel to simultaneously interpolate and % antialias. h = @(x) scale * kernel(scale * x); kernel_width = kernel_width / scale; else % No antialiasing; use unmodified kernel. h = kernel; end

(I don't always comment my code well, but I think I did OK here.)

Notice that we don't modify the kernel at all when we are growing a signal (scale > 1) instead of shrinking it (scale < 1).

Here are three versions of the cubic interpolation kernel: the original one, one modified for shrinking by a factor of 2, and one modified by shrinking by a factor of 4.

h1 = @cubic; h2 = @(x) 0.5 * h1(0.5*x); h4 = @(x) 0.25 * h1(0.25*x); fplot(h1,[-10 10],'LineWidth',2) hold on fplot(h2,[-10 10],'LineWidth',2) fplot(h4,[-10 10],'LineWidth',2) hold off legend('h_1(x)','h_2(x)','h_4(x)')

When we spread out the interpolation kernel in this way, the interpolation computation averages pixel values from a wider neighborhood to produce each output pixel. That is additional smoothing, which gives us the desired antialiasing effect.

Here is the imresize output for the zone plate image again.

imshow(Z4_imresize)

Only the rings near the center are visible. That's because those rings had lower spatial frequency in the original, and they can be successfully represented using only one-fourth the sampling rate. The higher-frequency rings further away from the center have been smoothed away into a solid gray.

You can experiment yourself with imresize by disabling antialiasing. Here's how to shrink an image with antialiasing turned off:

Z4_imresize_noaa = imresize(Z,0.25,'Antialiasing',false); imshow(Z4_imresize_noaa)

To give credit where credit is due, the algorithm used by imresize was inspired by the article "General Filtered Image Rescaling," by Dale Schumacher, in Graphics Gems III, Morgan Kaufmann, 1994.

Do you have other questions about imresize? Let me know by leaving a comment.

\n'); d.write(code_string); // Add copyright line at the bottom if specified. if (copyright.length > 0) { d.writeln(''); d.writeln('%%'); if (copyright.length > 0) { d.writeln('% _' + copyright + '_'); } } d.write('\n'); d.title = title + ' (MATLAB code)'; d.close(); } -->

Get the MATLAB code (requires JavaScript)

Published with MATLAB® R2016b

1|) instead of shrinking it (|scale < 1|). % % Here are three versions of the cubic interpolation kernel: the original one, % one modified for shrinking by a factor of 2, and one modified by % shrinking by a factor of 4. h1 = @cubic; h2 = @(x) 0.5 * h1(0.5*x); h4 = @(x) 0.25 * h1(0.25*x); fplot(h1,[-10 10],'LineWidth',2) hold on fplot(h2,[-10 10],'LineWidth',2) fplot(h4,[-10 10],'LineWidth',2) hold off legend('h_1(x)','h_2(x)','h_4(x)') %% % When we spread out the interpolation kernel in this way, the % interpolation computation averages pixel values from a wider neighborhood % to produce each output pixel. That is additional smoothing, which % gives us the desired antialiasing effect. % % Here is the |imresize| output for the zone plate image again. imshow(Z4_imresize) %% % Only the rings near the center are visible. That's because those rings % had lower spatial frequency in the original, and they can be successfully % represented using only one-fourth the sampling rate. The higher-frequency % rings further away from the center have been smoothed away into a solid % gray. % % You can experiment yourself with |imresize| by disabling % antialiasing. Here's how to shrink an image with antialiasing turned off: Z4_imresize_noaa = imresize(Z,0.25,'Antialiasing',false); imshow(Z4_imresize_noaa) %% % To give credit where credit is due, the algorithm used by |imresize| was % inspired by the article "General Filtered Image Rescaling," by Dale % Schumacher, in _Graphics Gems III_, Morgan Kaufmann, 1994. % % Do you have other questions about |imresize|? Let me know by leaving a % comment. ##### SOURCE END ##### b15b81f80bae4208bbaf292a3ba87035 -->

Categories: Blogs

## Why the Trump era is the perfect time to go long on freedom and short on surveillance

Cory Doctorow - 2017, January 12 - 07:34

My new Locus column is “It’s Time to Short Surveillance and Go Long on Freedom,” which starts by observing that Barack Obama’s legacy includes a beautifully operationalized, professional and terrifying surveillance apparatus, which Donald Trump inherits as he assumes office and makes ready to make good on his promise to deport millions of Americans and place Muslims under continuous surveillance.

But Trump supporters shouldn’t get too happy about this: after all, the billions Trump will pour into expanding America’s surveillance apparatus will be inherited by his successor — who may well be a Democrat who uses it for their own political ends.

The expansion of surveillance in the Trump era will create more and more people with direct experience of the perils of mass surveillance — and thus a larger audience for tools, products and services to help them safeguard their privacy. Privacy and surveillance are classic public health problems: because the downsides are so distant from the activity, it’s hard for us to make good judgments about when and how we should trade our privacy away. This is the same pattern that makes smoking so hard to combat.

Just as with smoking, surveillance will eventually reach the point of “peak indifference” — when the number of people who want to do something only goes up and up. That moment has already passed, and the Trump years will only accelerate the opposition to surveillance.

How can you short the surveillance economy and go long on technological freedom? Personally, you can peruse the easy-to-follow ‘‘Surveillance Self Defense’’ documentation maintained (in 11 languages!) by the Electronic Frontier Foundation (https://ssd.eff.org), and get your friends to do the same (remember, privacy is a team sport – it doesn’t matter if you keep your messages secure if your correspondents leave them in plain sight).

Think of how you could jailbreak Philips lightbulbs and HP printers and ‘‘smart’’ TVs and games consoles and cable boxes and load them with software that treats your personal data as if it was precious lifeblood, not the consequence-free exhalations of your digital metabolism. That’ll get you sued under Section 1201 of the Digital Millennium Copy­right Act, and again, we’ll have to see whether a peak-indifference judge will decide that’s what Congress meant when they passed the DMCA in 1998. But that’s what limited liability companies are for, right?

Most importantly, you short the surveillance economy by investing in the activist groups that are fighting to make it legally safe to command your devices to stop stabbing you in the back and start guarding your back. That’s groups like the Electronic Frontier Foundation (eff.org; dis­closure, I consult to, but don’t earn money from, the EFF), the American Civil Liberties Union (ACLU), and many, many others.

We’ve got a rough four years ahead of us, and it’s going to get a lot worse before it gets better. But the only thing that could make the privacy catastrophes of the coming years even worse is if we let them go to waste.

It’s Time to Short Surveillance and Go Long on Freedom [Cory Doctorow/Locus Magazine]

(Images: Warded Lock, Thegreenj, CC-BY-SA; Donald Trump, Michael Vadon, CC-BY-SA)

Categories: Blogs

## Two award wins & a staged reading with Ed Asner!

Casey McKinnon - 2017, January 10 - 20:07

2017 is off to an incredible start!

I am happy to announce that I won a BroadwayWorld Award in the category of Best Featured Actress for my role as Jackie Kennedy in The Tragedy of JFK. I'm also proud to say that fellow cast mates Tony Abatemarco and Susan Denaker, who played J. Edgar Hoover and Lady Bird Johnson, also won awards for Best Lead Actor and Actress. My deepest thanks to everyone who voted.

I also received recognition from The Last Straw Awards, where each year Los Angeles theatre reviewer Joe Straw names a number of artists who inspire him with their unique and hair raising work. In addition to myself, Straw named fellow cast members Time Winters, Tony Abatemarco, Chad Brannon, Jacob Sidney, and Cris D'Annunzio for their distinguished work, as well as our magnificent writer/director Daniel Henning. Thanks, Joe!

Photo courtesy of Rudy Jahchan.

And, if that wasn't enough, I got to start my year acting in a staged reading of Persephone Unbound with entertainment legend Ed Asner. Initially I had been cast in a supporting role, but after our first rehearsal, Ed had some very flattering things to say about me and the next thing I knew the producers called and offered me the lead role of Persephone! The play is a coming of age story based on Greek mythology and following a young Persephone who rebels against her parents by running away with Hades, god of the underworld. Ed Asner played my father Zeus, and the entire cast was made up of highly accomplished and recognizable actors. I was pleased to work with Chad Brannon a second time, and to become acquainted with Irene Roseen and James Handy, who I greatly admire.

All in all, I think this is a great start to the new year, and I look forward to what else 2017 has in store.

Categories: Blogs

## Aliasing and image resizing – part 2

Matlab Image processing blog - 2017, January 9 - 05:00

In my 03-Jan-2017 post, I introduced my new topic: aliasing, especially as it relates to resizing images. Today I will get more specific about what aliasing actually is.

I'll use a 1-D sequence to illustrate. Here is part of a 1-D sequence with a period of 8.

a = repmat([1 1 1 1 0 0 0 0],1,9) a = Columns 1 through 13 1 1 1 1 0 0 0 0 1 1 1 1 0 Columns 14 through 26 0 0 0 1 1 1 1 0 0 0 0 1 1 Columns 27 through 39 1 1 0 0 0 0 1 1 1 1 0 0 0 Columns 40 through 52 0 1 1 1 1 0 0 0 0 1 1 1 1 Columns 53 through 65 0 0 0 0 1 1 1 1 0 0 0 0 1 Columns 66 through 72 1 1 1 0 0 0 0

Now let's "shrink" the sequence by sampling it with a spacing that is greater than 1, using nearest-neighbor interpolation. First, let's try a spacing of 4/3.

f = 4/3; a_1 = a(round(1:f:end)) a_1 = Columns 1 through 13 1 1 1 0 0 0 1 1 1 0 0 0 1 Columns 14 through 26 1 1 0 0 0 1 1 1 0 0 0 1 1 Columns 27 through 39 1 0 0 0 1 1 1 0 0 0 1 1 1 Columns 40 through 52 0 0 0 1 1 1 0 0 0 1 1 1 0 Columns 53 through 54 0 0

The shrunken sequence has a period of 6. That's consistent with the original sequence period and the shrink factor: $8/(4/3) = 6$.

Now let's increase the shrink factor to 1.6.

f = 1.6; a_2 = a(round(1:f:end)) a_2 = Columns 1 through 13 1 1 1 0 0 1 1 1 0 0 1 1 1 Columns 14 through 26 0 0 1 1 1 0 0 1 1 1 0 0 1 Columns 27 through 39 1 1 0 0 1 1 1 0 0 1 1 1 0 Columns 40 through 45 0 1 1 1 0 0

The sequence a_2 has a period of 5. Again, that is consistent with the original sequence period and shrink factor: $8/1.6 = 5$.

Let's bump the shrink factor up to 4.

f = 4; a_3 = a(round(1:f:end)) a_3 = Columns 1 through 13 1 0 1 0 1 0 1 0 1 0 1 0 1 Columns 14 through 18 0 1 0 1 0

The sequence a_4 has a period of 2, which is still understandably straightforward: $8/4 = 2$. Note that 2 is the shortest period possible for a nonconstant periodic discrete sequence.

It gets more fun (and less straightforward) when the shrink factor goes above 4.

f = 6; a_4 = a(round(1:f:end)) a_4 = 1 0 0 1 1 0 0 1 1 0 0 1

Now the shrunken sequence's periodicity appears to be 5, and that's harder to understand because $8/6 \neq 5$.

To recap what we've seen so far: the period of the shrunken sequence decreased steadily as we increased the shrink factor, but only up to a point. Once the shrink factor increased above 4 (half the original period), the period of the shrunken sequence stopped decreasing and starting changing in a different fashion.

This is an example of what signal processing folk call aliasing. The term is used in the sense of one frequency masquerading as another.

This happens when the shrink factor becomes too high to preserve the period of the original sequence.

Now let me illustrate aliasing using a zone plate image. (You can get imzoneplate from the MATLAB Central File Exchange.)

Z = imzoneplate(501); imshow(Z) title('Z') Z4 = Z(1:4:end,1:4:end); imshow(Z4) title('Z4')

That result hardly looks anything like the original image. The visual artifacts are caused by aliasing. The original image has high spatial frequencies near the boundaries that can't be represented when we shrink the image. Those frequencies, instead of just disappearing, get "aliased" into a different set of spatial frequencies.

In general, aliasing distortion can't be removed once it has happened. Instead, antialiasing techniques must be applied as part of the image resizing process. Next time, I'll discuss the particular antialiasing procedure used by imresize.

\n'); d.write(code_string); // Add copyright line at the bottom if specified. if (copyright.length > 0) { d.writeln(''); d.writeln('%%'); if (copyright.length > 0) { d.writeln('% _' + copyright + '_'); } } d.write('\n'); d.title = title + ' (MATLAB code)'; d.close(); } -->

Get the MATLAB code (requires JavaScript)

Published with MATLAB® R2016b

, I introduced my new topic: _aliasing_, especially as % it relates to resizing images. Today I will get more specific about what % aliasing actually is. % % I'll use a 1-D sequence to illustrate. Here is part of a 1-D sequence % with a period of 8. a = repmat([1 1 1 1 0 0 0 0],1,9) %% % Now let's "shrink" the sequence by sampling it with a spacing that is % greater than 1, using nearest-neighbor interpolation. First, let's try a % spacing of 4/3. f = 4/3; a_1 = a(round(1:f:end)) %% % The shrunken sequence has a period of 6. That's consistent with the % original sequence period and the shrink factor: $8/(4/3) = 6$. % % Now let's increase the shrink factor to 1.6. f = 1.6; a_2 = a(round(1:f:end)) %% % The sequence |a_2| has a period of 5. Again, that is consistent with the % original sequence period and shrink factor: $8/1.6 = 5$. % % Let's bump the shrink factor up to 4. f = 4; a_3 = a(round(1:f:end)) %% % The sequence |a_4| has a period of 2, which is still understandably % straightforward: $8/4 = 2$. Note that 2 is the shortest period possible % for a nonconstant periodic discrete sequence. % % It gets more fun (and less straightforward) when the shrink factor goes % above 4. f = 6; a_4 = a(round(1:f:end)) %% % Now the shrunken sequence's periodicity appears to be 5, and that's % harder to understand because $8/6 \neq 5$. % % To recap what we've seen so far: the period of the shrunken sequence % decreased steadily as we increased the shrink factor, but only up to a % point. Once the shrink factor increased above 4 (half the original % period), the period of the shrunken sequence stopped decreasing and % starting changing in a different fashion. % % This is an example of what signal processing folk call _aliasing_. The % term is used in the sense of one frequency masquerading as another. % % This happens when the shrink factor becomes too high to preserve the % period of the original sequence. % % Now let me illustrate aliasing using a zone plate image. (You can get % imzoneplate from the .) Z = imzoneplate(501); imshow(Z) title('Z') %% Z4 = Z(1:4:end,1:4:end); imshow(Z4) title('Z4') %% % That result hardly looks anything like the original image. The visual % artifacts are caused by aliasing. The original image has high spatial % frequencies near the boundaries that can't be represented when we shrink % the image. Those frequencies, instead of just disappearing, get "aliased" % into a different set of spatial frequencies. % % In general, aliasing distortion can't be removed once it has happened. % Instead, antialiasing techniques must be applied as part of the image % resizing process. Next time, I'll discuss the particular antialiasing % procedure used by |imresize|. ##### SOURCE END ##### fa20e6797a7f4ffd94ac06a02c720d60 -->

Categories: Blogs

## Aliasing and image resizing – part 1

Matlab Image processing blog - 2017, January 3 - 05:00

Happy New Year!

I'm going to kick off 2017 with two or three posts about antialiasing. Specifically, I will discuss what antialiasing means in the context of image resizing, and I will explain how the imresize function does it.

Let me show you two pairs of images. Image A is a "zone plate" image that I made using my function imzoneplate. (You can get this function from the MATLAB Central File Exchange).

Image A1 shows a bunch of concentrating cirles, some with a bright and some with a dark center, arranged on a grid.

Image A

Image A1

OK, here are images B and B1. Image B is a texture image drawn from a photograph of blue jeans.

Image B1 shows a thumbnail image with another texture that is rotated roughly 90 degrees from the texture in image B.

Image B

Image B1

As you may have guessed, image A1 is a thumbnail-resized version of image A, and image B1 is a thumbnail-resized version of image B.

Here's a GIF animation that I made. It shows several different thumbnails of image B that are made with slightly different sizes. As the thumbnail sizes change, you can see the geometrical pattern actually seem to swing around in different directions.

Next time I'll talk about what causes this effect and what can be done about it.

\n'); d.write(code_string); // Add copyright line at the bottom if specified. if (copyright.length > 0) { d.writeln(''); d.writeln('%%'); if (copyright.length > 0) { d.writeln('% _' + copyright + '_'); } } d.write('\n'); d.title = title + ' (MATLAB code)'; d.close(); } -->

Get the MATLAB code (requires JavaScript)

Published with MATLAB® R2016b

). % % Image A1 shows a bunch of concentrating cirles, some with a bright % and some with a dark center, arranged on a grid. % % *Image A* % % <> % % *Image A1* % % <> % % OK, here are images B and B1. Image B is a texture image drawn from a % photograph of blue jeans. % % Image B1 shows a thumbnail image with another texture that is rotated % roughly 90 degrees from the texture in image B. % % *Image B* % % <> % % *Image B1* % % <> % % As you may have guessed, image A1 is a thumbnail-resized version of image % A, and image B1 is a thumbnail-resized version of image B. % % Here's a GIF animation that I made. It shows several different thumbnails % of image B that are made with slightly different sizes. As the thumbnail % sizes change, you can see the geometrical pattern actually seem to swing % around in different directions. % % <> % % Next time I'll talk about what causes this effect and what can be done % about it. ##### SOURCE END ##### 1c5310667cfa46cca5fd7cca48c5e3d5 -->

Categories: Blogs

## Kirkus just gave me an AWESOME Christmas present: this starred review for WALKAWAY

Cory Doctorow - 2016, December 27 - 01:01

Kirkus Reviews is one of the publishing industry’s toughest gauntlets, used by librarians and bookstore buyers to help sort through the avalanche of new titles, and its reviews often have a sting in their tails aimed at this audience, a pitiless rehearsal of the reasons you wouldn’t want to stock this book — vital intelligence for people making hard choices.

So when I saw the starred, uniformly glowing review for my next novel, Walkaway, with nary a quibble in sight, I did a little victory dance on the spot. Good reviews always feel good, but a perfect review from Kirkus? That’s amazing. This arrived just before Christmas but was embargoed until today, and it’s given my whole holiday season a glow.

As a reminder: you can pre-order one of the 2,800 signed hardcovers that I labored over, risking my wrist tendons for your reading pleasure.

Doctorow (Information Doesn’t Want to Be Free, 2014, etc.) offers a counterintuitive alternate (possible?) future in this gritty yet hopeful sci-fi epic.Inspired by Rebecca Solnit’s A Paradise Built in Hell (2009), Doctorow offers meticulous worldbuilding and philosophizing about how the world just around the corner might be. In an age of makers, 3-D printers, mobile fabricators, and endless food sources, the book asks what life would be like—or should be like—in a post-scarcity, post-employment world. The short answer is the rich have gotten insanely richer and everyone else has chucked it—walking away from society to live communally in environmentally gutted rural areas and dead cities. Our entry into this new societal framework is multinamed Hubert, known as Hubert, Etc., his pal Seth, and their new friend Natalie Redwater, the daughter of a member of the 1 percent. In the wilds of Canada, they fall in with a tech-savvy barkeep, Limpopo, who explains the precarious, money-less walkaway culture to the newbies: “In theory, it’s bullshit. This stuff only works in practice.” It’s a world where identity, sexuality, and perception are all fluid, enlivened by fiercely intellectual debates and the eternal human collisions that draw people together. Visually and culturally, it’s also a phantasmagorical scene with beer made from ditch water, tactical drone fleets, and the occasional zeppelin or mech—all technology that exists today. The tense situation escalates when the walkaways discover a way to scan and preserve consciousness online—if the body is gone, does perception remain? What threat might a tribe of immortal iconoclasts present to their capitalist overlords? Much of the novel focuses on Natalie (now “Iceweasel”), who is kidnapped by her father’s mercenaries. Doctorow sticks the landing with a multigenerational saga that extends this tale of the “first days of a better nation” to a thrilling and unexpected finale. A truly visionary techno-thriller that not only depicts how we might live tomorrow, but asks why we don’t already.

Categories: Blogs

## Free audiobook of Car Wars, my self-driving car/crypto back-door apocalypse story

Cory Doctorow - 2016, December 21 - 10:18

Last month, Melbourne’s Deakin University published Car Wars, a short story I wrote to inspire thinking and discussion about the engineering ethics questions in self-driving car design, moving beyond the trite and largely irrelevant trolley problem.

Shortly after, I went into Skyboat Media’s studio and recorded an audio edition of the story, which the Deakin folks mastered with visuals and SFX to produce a smashing video.

I’ve extracted just the audio as an MP3 for your mobile listening/podcast pleasure, as well.

Categories: Blogs

## Being Jackie Kennedy

Casey McKinnon - 2016, December 19 - 18:02

The Tragedy of JFK director Daniel Henning surrounded by The Kennedys on opening night. (Photo courtesy of Rick Baumgartner.)

It's difficult to put into words how much of a joy it has been to play such an incredible woman and icon of American history. Even as a Canadian, I grew up adoring her style and grace. And over the months we spent rehearsing, I did as much research as I could to be worthy of the shoes that I was about to fill. I read a ton and didn't sleep well through the whole process; early on I couldn't sleep because I had such horrifyingly vivid images flashing through my head, and later I couldn't sleep because I was just so darn excited to wake up every day and play Jackie Kennedy!

The role was even more than I dreamed it would be. I bonded very strongly with my cast mates, especially fellow Kennedys Ford Austin (JFK) and Chad Brannon (RFK), and we all worked so hard to bring these people back to life with our research and camaraderie. We were constantly sharing specific details and rare personal photos to better understand the spirits of the people we were invoking in our play.

When we opened, it was touching to come out after each performance and greet the awaiting audience members. It was music to our ears to hear how well each of us embodied the spirit of the people we were portraying on stage. And I felt an enormous outpouring of love, especially when Charlotte Rae blew me a kiss, and Teri Hatcher gave me a hug while uttering the word "amazing" in my ear.

“McKinnon is a gentle Jackie, full of grace, with a stunning resemblance to the first lady.” — Ellen Dostal, Broadway World “Casey McKinnon’s radiant Jackie.” — Steven Stanley, StageSceneLA “Casey McKinnon is the apotheosis of Jackie Kennedy, and she is equally stunning. Her craft is evenly exquisite as she executes with a precision rarely seen in a 99-seat venue down to the wisp of hair that falls near her eyes in the burial scene.” — Joe Straw

After the election, we weren't sure how the play would read with audiences. To our delight, the piece resonated even more. Especially the march to Selma with Martin Luther King Jr.'s powerful timeless message reflecting the Black Lives Matter movement, and Bobby Kennedy's tragic vision for a more compassionate and unified America.

We were so pleased to see the play get extended. And I was thrilled when it received seven nominations in the BroadwayWorld LA Awards, including my first ever nomination for a theatre role (Best Featured Actress). Voting is open until December 31st, so vote online before it's too late!

It's been interesting to play Jackie Kennedy on stage at the same time as Natalie Portman's highly publicized portrayal on screen. While I'm sure we both did very similar research from books, documentaries and archival footage, we had to take different vocal approaches to the character. Since Portman was playing Jackie on film, she had the liberty to use the delicate, whispered voice Jackie was known for. In the theatre, however, that wouldn't work. So, I had to do a ton of digging to find audio samples of Jackie speaking louder; something she only did when she was either giddy with delight or very upset. It was much more common for the first lady to use a sort of 1960s vocal fry in order to provide emphasis instead. I was so relieved when I came across the Schlesinger tapes released by Caroline Kennedy, as well as this interview with a beaming Jackie after Jack won the Democratic nomination in 1960. Portman and I both worked hard in our own mediums to honor this great lady, and I'd definitely love to trade notes with her someday over a cup of tea.

For me, becoming Jackie was a life-changing process. My mental image of myself changed significantly over the past few months. I found that whenever I removed my wig after a performance, I stopped recognizing the girl looking back at me in the mirror. Every day I found myself being more comfortable having thicker eyebrows, parting my hair to the side, and dressing a little more sophisticated. I even cut my hair to a shorter length, something more polished; a bit of a modern Jackie, I suppose.

In other ways, the role distanced me from the first lady. Playing a woman in the sixties, and surrounded by a cast of 13 men, I found myself slipping into a more traditional female role; being treated as a beauty, but overlooked in intellectual discussions. In order to maintain my sanity as a human being, I had to really speak up and be more assertive. It's funny how playing someone who criticized feminism has replenished my desire for gender equality.

A video posted by Casey McKinnon (@caseymckinnon) on Nov 20, 2016 at 2:05pm PST

Before our final performance, everyone backstage was very emotional. We knew that what we had here was special; our own Camelot.

Our final performance was filled with very real tears. Our JFK sincerely did not want to go to Dallas, every moment and touch was more profound, and the funeral scene was heartbreaking for every single one of us.

It's been an incredible opportunity and a rewarding journey. I'm so grateful to Daniel Henning for creating this amazing play and bringing together a cast of lovely, talented actors who I hope to work with again and again.

Thanks to everyone that came out to the theatre to support me, especially my loving mother Marian, my brother Greg, and my sister-in-law Jaimie who all flew in from Canada! This is the first time any of my family has seen me on stage as an actor and I was thrilled beyond words to have the opportunity to share this experience with them. On the night my mother came to see me, I got so choked up after the curtain call just taking in the knowledge that my mother was there. I have tears streaming down my face as I type that. I also had tears streaming down my face as I reread this paragraph hours later.

It meant a lot.

It also meant a lot to have so many of my best friends and new friends come out to see me. Thanks to my love Rudy Jahchan, my mentor Armin Shimerman, my bestie Raya Yarbrough, Bear McCreary, Paul Whitfield, Yuri Lowenthal, Tara Platt, Charlie Bodin, Robert Hewitt Wolfe, Celeste Wolfe, America Young, Jenelle Riley, Christian Lebano, Rob Nagle, Marcelo Tubert, Faith Collins, Dana DeRuyck, Andrew Perez, Crystal Keith, Ulka Mohanty, Eileen Rivera, Tom Merritt, Liz Miller, Meredith Berg, Ethan Erwin, Deborah Cresswell & Jack, Eunice Wilson, Eric Rudnick, Rachel Berney Needleman, Kitty Swink, Bo Foxworth, Elyse Mirto, Nar Williams & Rachel, Priscilla Taylor & Thane, Ken Simms, Leshar McGhee, Bree Wernicke, Mario Perez, Martine Battle, Amelia Meyers, Jason Rosenwach, Lorelei Bunjes, Corryn Cummins, Leslie Ranne & Patrick, Paul Romero, Olivia Delgado, James Ferrero, Shannon Leigh Reeve, and Sue Anna Yeh.

This was an extraordinary ride with some of the greatest cast and crew I've had the opportunity to work with so far. Thank you to all that shared in this one brief shining moment with me.

Categories: Blogs

## 'The Tragedy of JFK' nominated for 7 BroadwayWorld LA Awards!

Casey McKinnon - 2016, December 14 - 16:30

BroadwayWorld LA Award nominated actors Ford Austin and Casey McKinnon in The Tragedy of JFK (as told by Wm. Shakespeare). Photo courtesy of Rick Baumgartner

After a successful extended run, The Tragedy of JFK (as told by Wm. Shakespeare) has been nominated for seven BroadwayWorld LA Awards! We're all very proud of to see our production get such wonderful recognition, and we hope that you'll take the time to go and cast your vote online before it's too late.

Here is a full list of our nominations:

• Best Play (Local Production) - The Tragedy of JFK
• Best Direction of a Play (Local Production) - Daniel Henning, The Tragedy of JFK
• Best Featured Actor in a Play (Local Production) - Ford Austin, The Tragedy of JFK
• Best Featured Actress in a Play (Local Production) - Casey McKinnon, The Tragedy of JFK
• Best Leading Actor in a Play (Local Production) - Time Winters, The Tragedy of JFK
• Best Leading Actor in a Play (Local Production) - Tony Abatemarco, The Tragedy of JFK
• Best Leading Actress in a Play (Local Production) - Susan Denaker, The Tragedy of JFK

Working on this production has been rewarding in itself, but receiving this nomination for my role as Jackie Kennedy is the cherry on top of an already delicious sundae. Thanks to everyone who came to see us during the run, and to everyone who continues to support us by voting!

Categories: Blogs

## Everything is a Remix, including Star Wars, and that’s how I became a writer

Cory Doctorow - 2016, December 8 - 15:01

Kirby Ferguson, who created the remarkable Everything is a Remix series, has a new podcast hosted by the Recreate Coalition called Copy This and he hosted me on the debut episode (MP3) where we talked about copying, creativity, artists, and the future of the internet (as you might expect!).

Are you one of the many Star Wars fans eagerly awaiting the release of Rogue One: A Star Wars Story later this month? As you watch – and rewatch – the trailer, take a break to tune into Re:Create’s new Copy This podcast to learn about copyright and the role it’s played in the success of the fan-favorite series. As part of our ongoing work to elevate the discussion around copyright issues, the role copyright plays in our lives, and the need for balanced laws, Re:Create today launched Copy This hosted by writer, director and remixer Kirby Ferguson. The monthly podcast will bring to listeners conversations with some of the leading authors, policy minds, legal experts, and members of the creative community to take on the important questions and topics driving the copyright debate today.

Categories: Blogs

## Mr Robot has driven a stake through the Hollywood hacker, and not a moment too soon

Cory Doctorow - 2016, December 7 - 10:14

Mr Robot is the most successful example of a small but fast-growing genre of “techno-realist” media, where the focus is on realistic portrayals of hackers, information security, surveillance and privacy, and it represents a huge reversal on the usual portrayal of hackers and computers as convenient plot elements whose details can be finessed to meet the story’s demands, without regard to reality.

There’s a problem with this: information security really matters, and practically no one understands it, and most of what people think they know comes from (usually terrible) media portrayals. The Computer Fraud and Abuse Act, used to prosecute Aaron Swartz, was passed after a Wargames-inspired moral panic about teenagers starting WWIII from their bedrooms, and the next president thinks that hackers are 400 pound guys in their bedrooms and wants to rely on his 10 year old nephew to thwart them.

In my feature article for MIT Tech Review, I discuss the techno-realist movement, how it applies to my own novel Little Brother and its adaptation at Paramount, and what it portends for the future of art, security and law.

The show excels not only at talk but also at action. The actual act of hacking is intrinsically boring: it’s like watching a check-in clerk fix your airline reservation. Someone types a bunch of obscure strings into a terminal, frowns and shakes his head, types more, frowns again, types again, and then smiles. On the screen, a slightly different menu prompt represents the victory condition. But the show nails the anthropology of hacking, which is fascinating as all get-out. The way hackers decide what they’re going to do, and how they’re going to do it, is unprecedented in social history, because they make up an underground movement that, unlike every other underground in the past, has excellent, continuous, global communications. They also have intense power struggles, technical and tactical debates, and ethical conundrums—the kind of things found in any typical Mr. Robot episode.

Mr. Robot wasn’t the first technically realistic script ever pitched, but it had good timing. In 2014, as the USA Network was deliberating over whether to greenlight Mr. Robot’s pilot for a full season, Sony Pictures Entertainment was spectacularly hacked. Intruders dumped everything—prerelease films, private e-mails, sensitive financial documents—onto the Web, spawning lawsuits, humiliation, and acrimony that persists to this day. The Sony hack put the studio execs in a receptive frame of mind, says Kor Adana, a computer scientist turned screenwriter who is a writer and technology producer on the series. Adana told me the Sony hack created a moment in which the things people actually do with computers seemed to have quite enough drama to be worthy of treating them with dead-on accuracy.

[Cory Doctorow/MIT Tech Review]

Categories: Blogs

## Most Days (2016-12-06)

MerlinVimeo - 2016, December 6 - 14:51

INT. OFFICE - AFTERNOON

Right up there with Episode Seven.

See: Donald Hoffman: Do we see reality as it is? | TED Talk
Hear: Scott Pilgrim vs. the World (Original Motion Picture Soundtrack)
Idea: Siracusa doesn't work very hard.

Then: Alas…

Cast: Merlin Mann

Tags: Merlin Mann and Most Days

Categories: Blogs

## Most Days (2016-12-05)

MerlinVimeo - 2016, December 5 - 14:16

INT. OFFICE - AFTERNOON

Gotta go get my meat.

See: John Roderick's talk at XOXO
Idea: We're living in the future.
Revelation: Found my douche—big-time!
Fact: I own (at least) three Fantastic Four shirts

Then: An imminent retirement from vlogging.

(Check out DoByFriday.com)

Cast: Merlin Mann

Tags: Merlin Mann and Most Days

Categories: Blogs

## A new edition of the Information Doesn’t Want to Be Free audiobook featuring Neil Gaiman

Cory Doctorow - 2016, December 5 - 10:04

“Information Doesn’t Want to Be Free” is my 2014 nonfiction book about copyright, the internet, and earning a living, and it features two smashing introductions — one by Neil Gaiman and the other by Amanda Palmer.

I released an audio edition of the book in 2014, read by the incomparable Wil Wheaton, who also read the audiobook of my novel Homeland). At the time, I tried to get Neil and Amanda into a studio to record their intros, but we couldn’t get the stars to align.

But good things come to those who wait! Neil Gaiman’s 2016 essay collection The View From the Cheap Seats includes his introduction to my book, and the audiobook edition — which Neil himself read — therefore includes Neil’s reading of this essay.

Thanks to Neil, his agents, and the kind people at Harper Audio, I was able to get permission to include Neil’s reading of his essay for a remastered audio version of the audiobook (many thanks to Wryneck Studios’ John Taylor Williams for turning this around very quickly!), and as of today, you can buy the new edition for \$15. As with every one of my audiobooks, this is DRM-free, and makes a snazzy holiday gift.

Categories: Blogs

## Most Days (2016-12-04)

MerlinVimeo - 2016, December 4 - 14:51

INT. OFFICE - AFTERNOON

It's not in the budget.

See: "Lyle the Intern" on YouTube
Hear: "Creeper Lagoon" EP (1997)
Idea: Stop saying "double elimination"
Fact: I change shirts

(Check out DoByFriday.com)

Cast: Merlin Mann

Tags: Merlin Mann and Most Days

Categories: Blogs

## Most Days (2016-12-03)

MerlinVimeo - 2016, December 3 - 18:10

INT. OFFICE - EVENING

That's a pretty big gun.

STATE: Little out of practice