photo editing – What is the importance of background color when removing the background?

While any color can serve you well, three ways have emerged that can help you:

White background

You simply have a white background and try to illuminate that so much, that the RGB value for this reaches 255/255/255 which means it is pure white.

Pro: Very clean image

Contra: Need to be careful not to overblow the background so much that the edges of the subject become blown out as well, if you have rim light on the subject, the edges are not that clearly defined anymore.

Chromagreen or Chromablue background

Similar with other chances and problems. As long as the color does not appear in your subject, it makes the whole process even easier, as you don’t need to exactly overblow the background and can have a variety of shades in here before it ceases to work.

Pro: Easier to pull off, does not need exact or even lighting

Contra: If there is not enough space between the subject and the background, you might end up with the chroma color shining onto your subject which pollutes the color on the edges of your subject. You can see that sometimes in older films when the telltale blueish rim spoils the special effects.

Variant: Grey Background

This one is a bit more work but with some advantage. If you want to insert a background texture anyways, a grey background lets you keep the natural shadows. You basically shoot the image with background, insert the final background and then blend the texture over your subject, masking out the subject itself. While this is technically not the same as killing the background, it might be an alternative in certain situations.

photoshop – How do I change the background layer default color to white?

I’m looking for a similar resolution, but with mine any new document I open, opens with a transparent background as default… but I’ve followed the answer above and checked the background contents settings and thats set to white…

also as well… for example I’ve created a shape (triangle) and in the layers panel for that triangle layer the thumbnail is showing a transparent checkered pattern across the whole thumbnail not showing the shape at all because it thinks the background is transparent.

I’m sure there’s a setting somewhere in the preferences perhaps (unable to locate it – hence why I’m asking) where you can set the defaults and tell photoshop every new document or new layer default to white, black or black background.

if you can help
Many Thanks

Matt

photoshop – Wthat is the importance of background color when removing the background?

We are looking to make product images like this: https://prnt.sc/1067x5x . This is one of the best results that we have achieved with smartphone camera. Our process:

  1. Place an item on a grey background (works slightly better than white)
  2. Remove background automatically with Adobe PS + go through some spots manually to fix wrong cuts

My question is: what is the difference in backround colors, when it comes to automatic background removal? Like for example green being used in videography, will changing background to some specific color help automate background removal?

P.S. Any suggestion for software is much appreciated.

plotting – Contour map without filled color

I would like to get a picture of a contour map like this:
enter image description here

I tried to modify the following code to remove the filled color on the contour map. So far I didn’t succeed.

 contourPotentialPlot1 = ContourPlot[-3600. h^2 + 0.02974 h^4 - 5391.90 s^2 + 
   0.275 h^2 s^2 + 0.125 s^4, {h, -400, 400}, {s, -300, 300}, 
 PlotRange -> {-1.4*10^8, 2*10^7}, Contours -> 15, Axes -> False, 
 PlotPoints -> 30, PlotRangePadding -> 0, Frame -> False, ColorFunction -> "DarkRainbow"];

potential1 = Plot3D[-3600. h^2 + 0.02974 h^4 - 5391.90 s^2 + 0.275 h^2 s^2 + 
    0.125 s^4, {h, -400, 400}, {s, -300, 300}, 
   PlotRange -> {-1.4*10^8, 2*10^7}, ClippingStyle -> None, 
   MeshFunctions -> {#3 &}, Mesh -> 15, MeshStyle -> Opacity[.5], 
   MeshShading -> {{Opacity[.3], Blue}, {Opacity[.8], Orange}}, Lighting -> "Neutral"];

level = -1.2 10^8; gr = Graphics3D[{Texture[contourPotentialPlot1], EdgeForm[], 
Polygon[{{-400, -300, level}, {400, -300, level}, {400, 300, level}, {-400, 300, level}}, 
VertexTextureCoordinates -> {{0, 0}, {1, 0}, {1, 1}, {0, 1}}]}, Lighting -> "Neutral"];

Show[potential1, gr, PlotRange -> All, BoxRatios -> {1, 1, .6}, FaceGrids -> {Back, Left}]

If we run the above code we would get a picture like this:
enter image description here

unity – NullReferenceException in reticle color change script while cycling through children

I could really use another set of eyes on this. I am running into this error: NullReferenceException: Object reference not set to an instance of an object I can’t figure out.

In the script below. I’ve verified I’m cycling through the children well enough, and I thought I assigned them an appropriate object but for some reason only the first child of the selected reticle is turning red, and the following children are throwing the errors.

enter image description here

This is my Reticle Setup:

enter image description here

Each reticle group has a various number of objects with an Image component that make up a reticle. I turn on and off each reticle group depending on what fire button is being pressed, and return to default if none are pressed. On top of that the reticles are Red or White depending on if the WeaponManager says its a valid target or not.

These two lines in the script below are throwing the errors.

childGameObject2.GetComponent<Image>().color = Color.white;
childGameObject1.GetComponent<Image>().color = Color.red;

Whole reticle script:

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;

public class reticle : MonoBehaviour
{

    (SerializeField) private GameObject defaultReticle;
    (SerializeField) private GameObject machineGunReticle;
    (SerializeField) private GameObject rocketLauncherReticle;

    private int reticleSelect;
    private int fireOneSelect;
    private int fireTwoSelect;
    private int utilitySelect;

    private Transform childGameObject1;
    private Transform childGameObject2;

    // Start is called before the first frame update
    void Start()
    {
        // remove mouse cursor
        Cursor.lockState = CursorLockMode.Locked;
        Cursor.visible = false;

        defaultReticle.SetActive(true);
        reticleSelect = 1;

    }

    // Update is called once per frame
    void Update()
    {
        // update weapon selections from WeaponManager.cs
        fireOneSelect = WeaponManager.fireOneSelect;
        fireTwoSelect = WeaponManager.fireTwoSelect;
        utilitySelect = WeaponManager.utilitySelect;

        // toggle locked and free aim
        if (Input.GetKey(KeyCode.Tab))
        {
            if (Cursor.lockState == CursorLockMode.Locked)
            {
                Cursor.lockState = CursorLockMode.Confined;
            }
            else
            {
                Cursor.lockState = CursorLockMode.Locked;
            }
        }

        if (Input.GetKeyDown(KeyCode.Escape))
        {
            Cursor.visible = true;
        }

        if (WeaponManager.eligibleTarget == false)
        {
            // handle out of range reticle color changes
            for (int i = 0; i < gameObject.transform.childCount; i++)
            {
                if (gameObject.transform.GetChild(i).gameObject.activeSelf == true)
                {
                    Debug.Log(gameObject.transform.GetChild(i).name);
                    // cycle through all reticle children and turn them red
                    for (int g = 0; g < gameObject.transform.GetChild(i).gameObject.transform.childCount; g++)
                    {
                        childGameObject1 = gameObject.transform.GetChild(i).gameObject.transform.GetChild(g);
                        Debug.Log(childGameObject1.name);
                        //LINE BELOW CAUSING ISSUE WHEN NOT ELIGIBLE TARGET
                        childGameObject1.GetComponent<Image>().color = Color.red;
                    }
                }
            }
        }
        else if (WeaponManager.eligibleTarget == true)
        {
            // handle out of range reticle color changes
            for (int m = 0; m < gameObject.transform.childCount; m++)
            {
                if (gameObject.transform.GetChild(m).gameObject.activeSelf == true)
                {
                    Debug.Log(gameObject.transform.GetChild(m).name);
                    // cycle through all reticle children and turn them red
                    for (int h = 0; h < gameObject.transform.GetChild(m).gameObject.transform.childCount; h++)
                    {
                        childGameObject2 = gameObject.transform.GetChild(m).gameObject.transform.GetChild(h);
                        Debug.Log(childGameObject2.name);
                        //LINE BELOW CAUSING ISSUE WHEN ELIGIBLE TARGET
                        childGameObject2.GetComponent<Image>().color = Color.white; 
                    }
                }
            }
        }

        // decide if firing reticle is needed or show default reticle
        // reticleSelect values  
        // 1 = default
        // 2 = fireOne
        // 3 = fireTwo
        // 4 = utility
        if (Input.GetButton("Fire1"))
        {
            reticleSelect = 2;
        }
        else if (Input.GetButton("Fire2"))
        {
            reticleSelect = 3;
        }
        else
        {
            reticleSelect = 1;
        }

        // reset reticles to inactive to simplify code below
        for (int k = 0; k < gameObject.transform.childCount; k++)
        {
            gameObject.transform.GetChild(k).gameObject.SetActive(false);
        }

        // handle reticle switch logic
        if (reticleSelect == 1)
        {
            // handle default reticle
            defaultReticle.SetActive(true);
        }
        else if (reticleSelect == 2)
        {
            // handle fire one reticles
            switch (fireOneSelect)
            {
                // 1 = machineGun
                // 2 = na
                // 3 = na
                case 1:
                    machineGunReticle.SetActive(true);
                    break;
                case 2:
                    //newReticle.SetActive(true);
                    break;
                case 3:
                    //newReticle.SetActive(true);
                    break;
                default:
                    defaultReticle.SetActive(true);
                    break;
            }
        }
        else if (reticleSelect == 3)
        {
            // handle fire two reticles
            switch (fireTwoSelect)
            {
                // 1 = rocketLauncher
                // 2 = grenadeLauncher
                // 3 = na
                case 1:
                    rocketLauncherReticle.SetActive(true);
                    break;
                case 2:
                    //grenadeLauncher.SetActive(true);
                    break;
                case 3:
                    //newReticle.SetActive(true);
                    break;
                default:
                    defaultReticle.SetActive(true);
                    break;
            }

        }
        transform.position = Input.mousePosition;
    }

}

On a separate note, this bit of code seems incredibly inefficient to turn off all reticles each update before activating the chosen one, but its a lot cleaner than adding all the inactivate lines in the switch statement below that. How would one go about turning them on and off with less code?

// reset reticles to inactive to simplify code below
for (int k = 0; k < gameObject.transform.childCount; k++)
{
   gameObject.transform.GetChild(k).gameObject.SetActive(false);
}

Can you match color levels of semi-overlapping layers in GIMP using a single pixel color?

I am putting together fluorescent images taken on a microscope. I have taken sequential images that overlap for anywhere between 20 – 50 pixels at the edges. I have set up grids so that I have perfect overlap between them. These images are taken at different focus depths because our slide holder is slightly bent (cannot get it fixed just yet) so the overlapping colors are slightly different.

I was wondering if there is a method in GIMP to take a single pixel (or several) in the overlapping region from one layer and match it in the same pixel to an adjacent layer so that the entire color level of the adjacent layer matches the first layer based on that pixel selection?

First image is my whole image with guides removed. You can see the change in color between the various overlapping layers.

Second image are two overlapping layers I separated. The thing rectangle on the right side of the left image, and the thin rectangle on the left side of the right image will overlap when put together. I would like to take one bright spot in one of these rectangular regions to alter my colors in the other layer using the same spot.

I only recently started using GIMP and I am poorly experienced in image editing in general.

Whole image, guides removed

Overlapping layers separated

sharepoint online – How to change the color of odd and even rows of a list

You can add multiple classes in additionalRowClass property in above JSON as per your requirement.

For example, to change the color of rows with gray background to blue, you need to add ms-fontColor-blue class to the first condition, like:

{
  "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/row-formatting.schema.json",
  "additionalRowClass": {
    "operator": ":",
    "operands": [
      {
        "operator": "==",
        "operands": [
          {
            "operator": "%",
            "operands": [
              "@rowIndex",
              2
            ]
          },
          0
        ]
      },
      "sp-css-backgroundColor-neutralBackground ms-fontColor-blue",
      {
        "operator": ":",
        "operands": [
          {
            "operator": "==",
            "operands": [
              {
                "operator": "%",
                "operands": [
                  "@rowIndex",
                  2
                ]
              },
              1
            ]
          },
          "sp-css-backgroundColor-noFill",
          ""
        ]
      }
    ]
  }
}

You can find more predefined classed you can use in JSON formatting at:

  1. Predefined classes
  2. Reusable SharePoint Online Classes for Modern UI

Note: In SharePoint JSON formatting, @rowIndex starts with 0.

software – Does Gimp have a Match Color function similar to that in Adobe Photoshop?

I don’t know an automatic way to adjust colors in Gimp, buy you can do it manually with curves. Open the good image, use color picker to see the colors you want to match (activate its info window).

For example, I noticed that in the good image:

  • chair purple is approximately R=140, G=110, B=140
  • leaves are approximately R=110, G=150, B=110

And in the bad image:

  • chair is R=55, G=90, B=190
  • leaves are R=20, G=155, B=180

So there is too much blue, almost correct amount of green, and way to little red.

As a simple correction, I open the curves tool, select Red, channel, and let the curve pass through points (20,110) and (55,140) (because Red=20 should become R=110, and Red=55 should become Red=140). The image already looks much better now…

The next step, I select Blue channel, and let its curve pass through point (180,110) (Blue=180 is reduced to Blue=110) and through the second correction point (190,140):

curve transform in Blue channel

Finally, the green curve can pass through (90,110) and (155, 150), but I don’t like the result, and didn’t apply the green curve. Look at what you are doing, also don’t hesitate to move curve points a little and look at preview (I’d move red curve down a little, in fact, try it yourself).

Corrected image (blind two-point curve adjustments in Red and Blue channels):

corrected image

It is not exactly the same as the target image, but much closer than initially. Target image was:

target image

Consider also taking more color samples and more shades of the same color into considerations (in this example: the wall, dish, ceramics, shadows in the leaves). They may help to construct better curves


Update: being curious, how far this method can go, I wrote a small Python script, which takes colors from the first image, calculates best curves by averaging target values and adjusts the second image.

Corrected image:

corrected image

Target image:

target image

color palette idea for website design and mobile software

I need a color palette for website design and mobile software in agriculture.
I do not know if I should use blue or green because this program is also related to irrigation.
Thanks

Color Calibrating – the display? or the output? Key Basic Issues – help!

I have the Xrite i1Profiler and there are several things I need to understand.

1.) Calibration seems to mean running the software and creating a profile. The profile seems to be located on the computer. Which raises a slew of questions. First of all, it means that you’re not calibrating the screen – you’re calibrating the computer output. Second, it therefore means that the program would have to be run separately for every computer (output device). Third, if there’s no output device that can run a computer program (a DVD player, for instance), then calibration isn’t practically possible. but that can’t be right, can it?

2.) …and fourth, it means that you’re limiting the signal, and therefore not using the hardware potential to its maximum. THIS video https://www.youtube.com/watch?v=h_TT9O2I1b4 has an Xrite expert talking about what sounds like just that – that the calibration can end up in the hardware calibration of the screen. What I want is that: to calibrate the monitor/projector/TV, not to adjust (limit) the output to that screen. I don’t see how this process could be doing that, but I’d like that to be the case.

SO THE ULTIMATE QUESTIONS ARE:
A. if I have to use my Xrite i1Profiler to calibrate a screen for use with a game player or DVD-player that can’t run software, how do I do that?
B. If I have to use my Xrite i1Profiler to calibrate a wall-sized plasma TV (for example) for use without a player at all, how do I do that?

I’d really love to have a thorough grasp of the principles and possibilities (minus impossibilities) involved. My thanks in advance!