473,405 Members | 2,272 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

Looking for an algorithm

Hi all,

I have the following problem. I want to encode a 4bit bitmap into the
subpicture format of an DVD [1]. Now i can use
per "region" only for colors but for the whole subpicutre I can use 16
colors. So imagine I have the this example bitmap.

5 1 1 1 1
5 2 2 3 3
5 2 2 4 4
5 2 2 4 4
5 colors and in the end I should have min 2 regions. So whats now an
region you might ask: I will give some examples:

1)
5 1 1
5 2 2
5 2 2
5 2 2

2)
1 1 1 1
2 2 3 3
2 2 4 4
2 2 4 4
So a region is an area of the whole bitmap which only uses 4 colors
and it must be a rectangle. At the moment I am looking for a Region
Detection algorithm, which I can use to produce such regions.

Thanks for every idea, link and answer,
Christian

[1] http://dvd.sourceforge.net/dvdinfo/spu.html
Mar 7 '08 #1
1 1205
Christian Gmeiner wrote:
I have the following problem. I want to encode a 4bit bitmap into the
subpicture format of an DVD [1]. Now i can use
per "region" only for colors but for the whole subpicutre I can use 16
colors. So imagine I have the this example bitmap.

5 1 1 1 1
5 2 2 3 3
5 2 2 4 4
5 2 2 4 4
5 colors and in the end I should have min 2 regions. So whats now an
region you might ask: I will give some examples:

1)
5 1 1
5 2 2
5 2 2
5 2 2

2)
1 1 1 1
2 2 3 3
2 2 4 4
2 2 4 4
So a region is an area of the whole bitmap which only uses 4 colors
and it must be a rectangle. At the moment I am looking for a Region
Detection algorithm, which I can use to produce such regions.
Please ask in 'comp.programming'. This is *not* a C++ language
question. When you have the algorithm, but have problems putting
it into C++ terms, ask again, we'll help.

Also, consider googling for "region detection algorithm". FAWK,
if you know the name, you should be able to find at least something.

V
--
Please remove capital 'A's when replying by e-mail
I do not respond to top-posted replies, please don't ask
Mar 7 '08 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Jack Smith | last post by:
Hello, any help appreciated with following problem. I figured out the algorithm (I think), just having trouble proving it is optimal. Suppose we are given n tasks each of which takes 1 unit...
10
by: bpontius | last post by:
The GES Algorithm A Surprisingly Simple Algorithm for Parallel Pattern Matching "Partially because the best algorithms presented in the literature are difficult to understand and to implement,...
4
by: Thomas Christmann | last post by:
Hi! First let me apologize for asking this question when there are so many answers to it on Google, but most of them are really contradicting, and making what I want to do very performant is...
30
by: mistral | last post by:
Neeed good javascript unescape encoder, to protect javascript code. Some advices? Online tool, or ready javascript only. Any opinions about the Javascript Obfuscator:...
2
by: Julio C. Hernandez Castro | last post by:
Dear all, We have just developped a new block cipher called Raiden, following a Feistel Network structure by means of genetic programming. Our intention now consists on getting as much feedback...
12
by: amogan | last post by:
**If interested & qualified, please reply with your resume directly to amogan@google.com** Referrals are always welcome!! Network System Test Engineer - Mountain View This position is...
3
by: Max Odendahl | last post by:
Hi, I am looking for algorithms to layout rectangles underneath each other in a sidebar. All rectangles have different heights as well as an ankor point. The rectangle can have scrollbars, but...
0
by: aruna | last post by:
hey guys i earlier had very valuable responses from you all for base64 encoding algorithm.so thank for that. so now i need your assistance to do a float encoding algorithm. you may wonder why i'm...
1
by: rengaraj | last post by:
hello friends i am looking for algorithm of logarithm function.how does it work?could you help me on this or send me sample codes thanks in advance
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.