close

The following is an example[1] of image blending, which seamlessly combines two different images by using the mask of itself.

image

About half a year ago, I studied something about how to mange multiple ROIs(region of interest) as shown below.

Today I am planing to combine both of them in order to meet my new requirements.

image

Rectangle #1: person

image

Rectangle #2: dress

 image

Rectangle #3: decoration

image

Todo list:

1. One can add a resizable rectangle to a list or remove it if necessary.

2. The postion of each rectangle represents the location that an image should be placed.

3. For every image object, we can adjust its brightness to uniform according to the whole image luminance distribution.

4. One can rotate a rectangle(image object) by a certain angle.

-----------------------------------------------------------------------------------------

How to change object`s layer?

Try to consider such a condition that there are two rectangles over here, which are labeled as 0 and 1.

And you want to manipulate the position of a small rectangle(1), which locates right underneth a bigger one(0).

In this case, the small rectangle must be above the bigger one in oder to select it with mouse.

In other words, a small rectangle should not be inserted until the bigger one is added.

On the contrary, if we want to move the big rectangle without changing the position of the small one.

All we need to do is just put the small rectangle in the back of the larger one.

Then we can move the big rectangle independently.

 image

How to move multiple correlated rectangles simultaneously?

Sometimes we need to bind several rectangles together in order to move them to somewhere.

So to build a tree structure in the same group may easily accomplish such a requirement.

 

Design Pattern:

Composite Pattern: Build a tree structure in order to know all membership of a group.

Observer Pattern: Give information to all observers, once the location of observable has been changed.

Maybe composite pattern can do all the job itself without using observer pattern since we have all membership of a group indeed.

-----------------------------------------------------------------------------------------

 

 

References:

1. Image Blending - CMU Graphics Lab

2. Part 2: Manage Regions of Interest (ROI) and Annotate Images3

arrow
arrow
    全站熱搜
    創作者介紹
    創作者 me1237guy 的頭像
    me1237guy

    天天向上

    me1237guy 發表在 痞客邦 留言(0) 人氣()