Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: inputScale limitation in CIPixellate




On Jun 28, 2005, at 11:15 AM, Roland Torres wrote:

I'm using the CIPixellate filter to simulate machine vision through differing sensor array grids. This means I need to be able to convert an input image to 1x1, 2x2, 4x4, 8x8, 16x16, etc., up to full resolution.

Instead of providing some sort of "resultBlocks" argument, the CIPixellate filter uses an "inputScale" argument, which goes from 1 to 100. So, starting with an input image of 800x800, the lowest pixellation value I can achieve is 8x8.

How can I achieve 1x1, 2x2, and 4x4 pixellations? I also have cases that use larger images. Is it possible to go beyond the 100 maximum for inputScale?
Yes you can. The relevant attributes for the scale parameter in CIPixellate are:

        CIAttributeMin = 1;
        CIAttributeSliderMax = 100;
        CIAttributeSliderMin = 1;

so the 1-100 range is only the recommended slider range if an application wants to create UI ... the parameter does not have an upper limit (CIAttributeMax key is not present), so you can set it to the image width to get 1x1 pixellations.

hope this helps,
- Ralph

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Quartz-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/quartz-dev/email@hidden

This email sent to email@hidden

References: 
 >inputScale limitation in CIPixellate (From: Roland Torres <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.