473,468 Members | 1,771 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Posterization for Blue Color

18 New Member
I know how to do posterization for image processing, such as below...

public BufferedImage doPosterization(BufferedImage inputImage,
int posterizationValue) {
short[] posterize = new short[256];

for (int i = 0; i < 256; i++) {
posterize[i] = (short) (i - (i % posterizationValue));
}

BufferedImageOp op = new LookupOp(new ShortLookupTable(0, posterize),
null);
BufferedImage mBufferedImage = op.filter(inputImage, null);
return mBufferedImage;
}

But how to do posterzation just on blue element? where the posterization value will be inputted by the user.
Thanks!
Feb 12 '08 #1
1 2388
BigDaddyLH
1,216 Recognized Expert Top Contributor
Look at the other constructor of ShortLookupTable.
Feb 12 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Manavendra Gupta | last post by:
Hi I have a following recursive method: private File findMatchOnDestination(File fileList, String name) { for (int i = 0; i < fileList.length; i++) { if (fileList.isDirectory()) {...
7
by: Will Hartung | last post by:
I have this: <a class="pink_link" href="faq.html#q1">Go to question 1</a> And the CSS is simply: ..pink_link {color: #fa61b7; font-weight: bold;} So, I'm curious why my links are blue and...
4
by: Dino M. Buljubasic | last post by:
This might be a silly question but I have never seen this before. I suddenly got some blue squares on the left side (the place where break points are shown if any exist). Anybody knows what...
3
by: Shmulik | last post by:
I have an application written in C# that creates a queue of items to process, connects via a TCP connection to a server on a Unix box, and then passes data files to the Unix box for processing...
7
by: Richard | last post by:
If the grid is dragged off the screen and back on the data is visible. Tried a dg.refresh() and Inactivate(). Can I do this by overriding custom base class OnPaint that my form inherits from? I...
13
by: Jorn Ronnow | last post by:
I'm a bit confused here, since the help in M$ Visual Studio 2005 states the syntax for enum as: enum {enum-list} ; So, it would be possible to write: enum Protocol_t : unsigned char {...
2
by: mjrtom19 | last post by:
I have a Jframe using a menubar to determine the color and shape of a graphics2d object, at the moment the color stays red no matter what. I think the problem is in the itemListener in the inner...
0
by: sweatha | last post by:
Hello Friends I have created the project with 2 forms. In the first form, I have 2 buttons. The first button has the backcolor as "fusia" by default. If I click the button means then backcolor of...
3
by: helraizer1 | last post by:
Hey folks, yet again. if ($back == "m") //$back is a value pulled from a db; that works perfectly. { $wid = $rowing; $hei = $rowing; createthumb("660x240background2.gif", "./user/" ....
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

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.