MathGroup Archive 2010

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: non rectangular crop

  • To: mathgroup at smc.vnet.net
  • Subject: [mg110736] Re: non rectangular crop
  • From: David Bailey <dave at removedbailey.co.uk>
  • Date: Sun, 4 Jul 2010 03:08:45 -0400 (EDT)
  • References: <i0n9tr$hs4$1@smc.vnet.net>

On 03/07/10 13:20, Patrick Scheibe wrote:
> Hi,
>
>> is it possible to have a not rectangular image in Mathematica?
>
> no. You can of course use SparseArray to create one and therefore you
> could create an image where you don't have to specify the whole image
> matrix
>
> Image[SparseArray[{{1, 1} ->  0.3, {7, 2} ->  0.5, {9, 9} ->  1}, {10,
>     10}]]
>
> but internally it stores the whole matrix
>
> InputForm[%]
>
>
>> I have a lot of images acquired by microscope - they are all squared,
>> with the circular field of view surrounded by black.
>> I'd like - for further processing - to crop all the black region
>> outside the circle.
>
> but if the outside of your circular region is black then it is already
> croped in some way because filters like binarization, blur-filters,
> segmentation, registration, ... will ignore the black regions. I don't
> see your concerns.
>
> Cheers
> Patrick
>
>
Of course, you can fill the black part of your image with a totally 
transparent 'colour' using the 4-argument form of RGBColor. That will 
mean that you can place the image over other graphics, and only the 
circular region will obscure what is underneath.

David Bailey

http://www.dbaileyconsultancy.co.uk


  • Prev by Date: Re: how to tell Mathematica to display x^-1 as x^-1 and not as 1/x
  • Next by Date: Re: how to tell Mathematica to display x^-1 as x^-1 and not as 1/x
  • Previous by thread: Re: non rectangular crop
  • Next by thread: How to edit a help reference page (e.g. NIntegrate.nb)?