Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8451073
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T11:08:21+00:00 2026-06-10T11:08:21+00:00

I am working with vImages in Cocoa Touch, which in my case are basically

  • 0

I am working with vImages in Cocoa Touch, which in my case are basically ARGB-float-Arrays, and I need to do a subsampling. Low pass filtering is no problem using the vImage functions but how do I select one out 2×2 pixels (assuming I want to subsample by factor 2)? Of course I could use a vDSP stride function, but this only works for horizontal subsampling, not vertical subsampling.

I hope the following will clarify what I intend to do. I wish to select all pixels marked with an X as shown in this image:

X O X O X O
O O O O O O
X O X O X O
O O O O O O
X O X O X O
O O O O O O

But since the memory is linear, my array looks like this:

X O X O X O O O O O O O X O X O X O O O O O O O X O X O X O O O O O O O

How can I perform subsampling in a reasonable fashion?

EDIT: I am looking for an efficient way to do a two dimensional downsampling of a given bitmap stored as a one dimensional float-array (that includes negative values).

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T11:08:22+00:00Added an answer on June 10, 2026 at 11:08 am

    The reality is that when you’re doing this sort of subsampling, there isn’t really anything clever that can be done; strided memory access doesn’t admit many tricks to go fast, so any library code you use will be essentially equivalent to the C code you might write yourself in a few minutes. I would use a simple C implementation.

    I believe that this can be done reasonably efficiently on the GPU, but that won’t be a performance win unless your data is already in a GPU context. If you have to transfer the data there first, that cost will swamp any performance savings in the actual operation.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Working with an API where I need to send a value over in an
Working in Scala-IDE, I have a Java library, in which one of the methods
Working on a project where I need to add points to an array. Here
Working on a project an need a specific effect on the homepage. When a
Working on a Flash iOS app and I need to utilize a couple Apple
Working with python interactively, it's sometimes necessary to display a result which is some
Working in C#, I need to find all local peaks in a List of
Working on a small game using an HTML5 canvas, and javascript. And it's working
Working with an undisclosed API, I found a function that can set the number
Working with Reporting Services 2008 r2. So here's my issue: We have 5 reports

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.