Blend design to T Shirt without losing design color - image-processing

I am just learning to use Photoshop CS2 and trying to blend my designs on my t shirt mockups.
I am able to blend the design successfully but I loose the original color (white) of my design after blending and setting opacity to normal and 50%. The design color becomes like the shirt color.
How do I successfully blend designs on t shirt mockup without losing my design color? What are the correct settings to keep my original design color intact after blending?
I successfully blended my artwork to my base but lost the color of my artwork (white) after blending. I expected to see my blended artwork on t shirt mockup in its original color (white). The blending is fine, just the loss of artwork color.
Many thanks for help with this.

Related

Check if image background is simple or complicated python3

I have set of real pictures. Is there a way to check if the background is a simple color or a complex/ complicated background using python3?
2 types of images:
Simple background as human see it as 1 color but because of the lighting, each pixel values are different:
Complicated/ Complex background
I tried many methods but none of them works:
colors counter. Because of lightings and shades, each pixel color values are different.
pixel variance.
colors bin
color quantize

Identification of colors in a transparent bottle under different lighting conditions

I am trying to identify set of colors in bottles which are kept serially using OpenCV. I have tried the following procedures but most of them fail in different colors of ambient light.
Image segmentation using Histogram but fails for ambient light condition
Image segmentation using K-means but that also fails for ambient light colors.
Tried the color masking technique by defining the colors I am looking for but that isn't too great too.
White balancing the image and then applying the above techniques. But that technique gives problematic colors normal white color background.
Any recommendation on this would be much appreciated. A reference image is attached.
I am looking for the following result. I would like to detect light yellow, light yellow, peach, peach, orange, orange, orange, orange, ivory, pink.

How bright is part of UIImage?

Have a label over part of an UIImageView. If image is too bright white text can not read. Any easy way to detect how bright portion of the image?
There is no "easy" way of doing it at least for processor. For developer it is easiest to get access to raw RGBA buffer of image data and find out what is the average color. Then convert that color to HSV and check saturation to determine the brightness. You can even use GPU to make things a bit quicker; openGL should be perfect for that.
But before you get too far: The result will most likely not be what you are looking for. There are always cases that will make your text unreadable no matter what color they are. Consider you have a white text and will convert it to black once image is too bright. But then the image consists purely of black and white stripes so that every odd letter is over white stripe and the rest are on black. The text is simply unreadable.
I suggest you try with stroke, dropping shadows or adding a background. You can for instance have white text on a label and use semitransparent black background color with some layer corner radius. The background will barely be visible on all but the brightest images and text will always be readable.

OpenCV Floodfill - Replace pixel color with transparent pixel

I'm trying to do Floodfill on UIImage and ended up using OpenCV framework. I can replace the color with a solid color by defining the color as cv::Scalar(255,0,0). However I want the floodfill selection to be transparent.
I don't know how I can define a transparent color in OpenCV and to the best of my knowledge it's not possible and the only option is to merge the image to a transparent background. Again it doesn't make much sense to Floodfill using a solid color and then merge it with a transparent layer as the result will be the original image with solid color in the fill areas.
Please correct me if I'm wrong.
Much appreciate your help in solving this.
Cheers
You cannot define a transparent color in OpenCV since it currently do not support image with alpha channel.
However, there exists a tricky solution. You may first refer to this question to create a mask of your floodfill area. Then you can easily calculate the alpha channel from this mask.

blending colors ios

I want to rectangular crop the eye from one face and paste it on another face, so that in the resulting image skin color of portion of eye blend nicely with the face color of the persons on which we are pasting eyes. I am able to crop and paste, but having problem with blending. Currently, the boundaries of the rectangular cropped eye after pasting are very much visible. I want to reduce this effect, so that the eyes nicely blend with face and resulting image won't look fake.
My suggestion is to do the blending in code. First, you need do create two bitmap contexts so you have the bits of your face and the bits of your new eye.
in the overlap area only, you need to determine the outer most "skin" area by evaluating the colors of the two areas, and create a mapping of those areas in both that are "skin". you would be working from the outermost areas and work towards the center.
for color evaluation, you should turn colors into HSV (or HCL) and look at hue and saturation.
you will need to figure out some criteria for determining what is skin and what is eye
once you have defined the outer area - the one NOT an eye, but skin, you will blend. The blend will use more of the original based on its distance from the center of the eye (or distance to the ellipse defining the eye. Thus initially, the outer color will be say 5% new, 95% original.
as you get close to the eye, you will use more of the eye overlay skin color.
This should produce a really nice image. The biggest problem of course will be getting a good algorithm for separating eye from skin.

Resources