Salt boundary interpretation is a crucial step for velocity-model building in seismic migration, but it remains a highly labor-intensive task for manual interpretation and a big challenge for automatic methods. We have developed a semiautomatic method to efficiently and accurately extract 2D and 3D complicated salt boundaries from a seismic attribute image that highlights salt boundaries. In 2D salt boundary extraction, we first pick a few points to interpolate an initial curve that is close to the true salt boundary. These points are picked near the salt boundary but are not required to be exactly on the boundary, which makes human interactions convenient and efficient. We then resample the salt boundary attribute image in a band area centered at the initial curve to obtain a new image in which the true salt boundary is an open curve extending laterally. We then extract the salt boundary in the new image using an optimal-path picking algorithm, which is robust enough to track a stable salt boundary from highly discontinuous attribute values by solving a global maximization problem. We finally map the picked path back to the original image to obtain a final salt boundary. In 3D salt boundary extraction, we apply the 2D method to recursively pick 2D salt boundaries in a sequence of inline or crossline slices and then use these 2D boundaries to fit an implicit (level-set) surface of the 3D salt boundary. In our recursive picking, human interactions are greatly reduced by using a salt boundary picked in the previous slice as an initial curve for picking in a followed slice. The effectiveness of our method is confirmed with 2D and 3D real seismic images.