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

  • Home
  • SEARCH
  • 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 5957223
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T18:22:13+00:00 2026-05-22T18:22:13+00:00

I want to implement the seam carving algorithm by Avidan/Shamir. After the energy computing

  • 0

I want to implement the seam carving algorithm by Avidan/Shamir. After the energy computing stage which can be implemented using a core image filter, I need to compute the seams with the lowest energy which can’t be implemented as a core image filter for it uses dynamic programming (and you don’t have access to previous computations in opengl shading language).

So i need a way to access the pixel data of an image efficiently in objective-c cocoa.

Pseudo code omitting boundary checks:

for y in 0..lines(image) do:
  for x in 0..columns(image) do:
    output[x][y] = value(image, x, y) + 
                     min{ output[x-1][y-1]; output[x][y-1]; output[x+1][y-1] }
  • 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-05-22T18:22:14+00:00Added an answer on May 22, 2026 at 6:22 pm

    The best way to get access to the pixel values for an image, is to create a CGBitmapContextRef with CGBitmapContextCreate. The important part about this is that when you create the context, you get to pass the pointer in that will be used as the backing store for the bitmap’s data. Meaning that data will hold the pixel values and you can do what ever you want with them.

    So the steps should be:

    1. Allocate a buffer with malloc or another suitable allocator.
    2. Pass that buffer as the first parameter to CGBitmapContextCreate.
    3. Draw your image into the returned CGBitmapContextRef.
    4. Release the context.
    5. Now you have your original data pointer that is filled with pixels in the format specified in the call to CGBitmapContextCreate.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to implement an ISAPI filter like feature using HttpModule in IIS7 running
I want to implement a simple debug log, which consists of a table into
I want to implement user stories in a new project where can i find
I want to implement the solution using the pre-processor described here: Reuse define statement
I want to implement the floating window in the html which it has scroll
i want to implement my own Zend_Paginator_Adapter so i implemented Zend_Paginator_Adapter_Interface ( docs ).
I want to implement Fast Fourier Transform algorithm with Hadoop. I know recursive-fft algorithm
I want to implement search functionality for a website (assume it is similar to
I want to implement an automatic update system for a windows application. Right now
I want to implement a paperless filing system and was looking to use WIA

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.